728x90
반응형
charAt()()
charAt() 메서드는 위치값을 검색하고 문자로 반환 합니다.
match()
"문자열".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
'JavaScript' 카테고리의 다른 글
jQuery (4) | 2022.08.29 |
---|---|
함수의 유형 (3) | 2022.08.22 |
match( ) (2) | 2022.08.22 |
search( ) (2) | 2022.08.22 |
toUpperCase( ) / toLowerCase( ) / trim( ) (1) | 2022.08.17 |
댓글