๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Javascript

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ : ๋ฌธ์ž์—ด ๊ฒ€์ƒ‰ ๋ฉ”์„œ๋“œ : charAt()

by ์ฝ”ํŒŒ์นด 2022. 8. 22.
728x90

๋ฌธ์ž์—ด ๊ฒ€์ƒ‰ ๋ฉ”์„œ๋“œ : charAt()

charAt() ๋ฉ”์„œ๋“œ๋Š” ๋ฌธ์ž์—ด์—์„œ ํŠน์ • ์ธ๋ฑ์Šค์— ์œ„์น˜ํ•˜๋Š” ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.


charAt() ๋ฉ”์„œ๋“œ

"๋ฌธ์ž์—ด".charAt(์ˆซ์ž)

const str1 = "javascript reference";
const currentStr1 = str1.charAt();
const currentStr2 = str1.charAt("0");
const currentStr3 = str1.charAt("1");
const currentStr4 = str1.charAt("2");
๊ฒฐ๊ณผ๋ณด๊ธฐ
j
j
a
v

728x90

๋Œ“๊ธ€

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ๐Ÿฆ™

CSS
๊ด‘๊ณ  ์ค€๋น„์ค‘