SOURCE

var str="Rome was not built in a day"
var sum=0
for(var i of str){
    sum++;
}
console.log("该字符串中字符个数为"+sum)
console 命令行工具 X clear

                    
>
console