본문 바로가기

ES6

string 메소드 - includes(), repeat(), startsWith(), endsWith()

반응형

See the Pen 200918-5 by hwd3004 (@hwd3004) on CodePen.

 

includes

찾고 싶은 문자가 있는지 확인

 

 

 

See the Pen 200918-6 by hwd3004 (@hwd3004) on CodePen.

repeat
글자 반복

 

 

 

See the Pen 200918-7 by hwd3004 (@hwd3004) on CodePen.

startsWith

문자열이 지정해준 값으로 시작하는지 확인

 

endsWith

문자열이 지정해준 값으로 끝나는지 확인

반응형

'ES6' 카테고리의 다른 글

Array.findIndex(), Array.fill()  (0) 2020.09.18
Array.from() - 매우 중요  (0) 2020.09.18
Cloning Styled Components  (0) 2020.09.18
HTML Fragments  (0) 2020.09.17
Default Values  (0) 2020.09.17