我先定义了一个字符串变量.
var s = "a,b,c,"
运行 s.typeof() 后出现问题
TypeError: s.typeof is not a function
运行 typeof(s) 之后成功了, 得到 string
在 http://stackoverflow.com/questions/4164550/substring-error-is-not-a-function 看了类似的问题, 但是还是不太理解(应该是我语言不过关的问题).
---
补充:
发现如果方法名首字母大写就会出问题, 问题在这儿吗?
var s = "a,b,c,"
运行 s.typeof() 后出现问题
TypeError: s.typeof is not a function
运行 typeof(s) 之后成功了, 得到 string
在 http://stackoverflow.com/questions/4164550/substring-error-is-not-a-function 看了类似的问题, 但是还是不太理解(应该是我语言不过关的问题).
---
补充:
发现如果方法名首字母大写就会出问题, 问题在这儿吗?