[JS]String method(startsWith, endsWith, includes,repeat)

hyeonze·2021년 12월 1일
0

문자열에서 중복검사 결과를 반환하는 메서드

const email = 'yealee.kim87@gmail.com';

console.log(email.startsWith('ye')); // true
console.log(email.endsWith('com')); // true
console.log(email.includes('@gmail')); // true

특정 문자열을 반복할때 사용하는 메서드

'#'.repeat(3); // ###
profile
Advanced thinking should be put into advanced code.

0개의 댓글