此属性返回字符串中的字符数。
string.length
var uname = new String("Hello World") console.log(uname) console.log("Length "+uname.length) // returns the total number of characters // including whitespace
Hello World Length 11