string.@@iterator
The [@@interator]()
method๋ String value์ code point๋ฅผ ๋ฐ๋ณตํ๋ new Iterator
object๋ฅผ ๋ฐํํ๊ณ ๊ฐ code point๋ฅผ string value๋ก ๋ฐํํ๋ค. ๐ง
next() ๋ฉ์๋๋ value๋ก done(boolean)๊ณผ value๋ฅผ ๊ฐ์ง๋ค.
Syntax
Return value
new Iterator Object
Examples
Using [@@iterator]()
[@@iterator]()
surrogate pair(UTF-16 ์ฝ๋ ๋๊ฐ๋ฅผ ์ฌ์ฉํ์ฌ ํ๋์ ๊ธ์๋ฅผ ๋ํ๋ธ ๊ฒ)๋๋ ์๊นจ์ง๋ ๊ฒ์ ํ์ธ ํ ์ ์๋ค.
Using [@@iterator]()
with for..of
[@@iterator]()
with for..offor..of ๊ตฌ๋ฌธ์ ์ปฌ๋ ์ ์ ์ฉ [Symbol.iterator]์์ฑ์ด ์๋ ๋ชจ๋ ์ปฌ๋ ์ ์์์ ๋ํด ์ด ๋ฐฉ์์ผ๋ก ๋ฐ๋ณตํ๋ค.
Browser compatibillity: IE, Opera, Safari์์ No
Last updated
Was this helpful?