SOURCE

var str ="Rome was not built in a day";
      var length =0;
      for(var i of str)
      {
        length++;
      }
    document.write(str);
    document.write(length);
console 命令行工具 X clear

                    
>
console