728x90
๋ฐ์ํ
charAt() : ์ง์ ํ ์ธ๋ฑ์ค์ ๋ฌธ์๋ฅผ ์ถ์ถ : ๋ฐํ(๋ฌธ์์ด)
charAt () ๋ฉ์๋๋ ์ง์ ๋ ์ธ๋ฑ์ค์์๋ ๋ฌธ์๋ฅผ ๋ฐํํฉ๋๋ค.
"๋ฌธ์์ด".charAt(์ซ์);
const str1 = "javascript reference";
const currentStr1 = str1.charAt(); //j
const currentStr2 = str1.charAt("0"); //j
const currentStr3 = str1.charAt("1"); //a
const currentStr4 = str1.charAt("2"); //v
728x90
๋ฐ์ํ
'์๋ฐ์คํฌ๋ฆฝํธ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
GSAP๋? (7) | 2022.08.29 |
---|---|
ํจ์ ์ดํดํ๊ธฐ 2 (5) | 2022.08.22 |
match() (6) | 2022.08.22 |
search() (5) | 2022.08.22 |
includes() (5) | 2022.08.17 |
๋๊ธ