Why js for loops can traverse strings

I don"t see the source of the for traversal string, but I use it all the time. Want to know why

clipboard.png

Sep.03,2021

set a string variable in the console, and you can find that the iterator is implemented by looking at the prototype chain of the variable by _ _ proto__ . For more information about iterators, please refer to here

.


any iterator can be implemented


because js is a weak language

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ec1328-2b35.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ec1328-2b35.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?