Js string why you can use the array form of the subscript value, to find the principle.

such as code:
let str = "sdfsdfsdfdf";
console.log (str [1]) / / d

What is the specific principle of

?
the Internet says that a string is an array of characters, but I"m not sure. I hope there will be a really clear god to explain

Jun.03,2021

because String has an Iterator interface, it can be iterated. What principle do you want?
http://es6.ruanyifeng.com/-sharpdo.

Menu