[javascript] 모음제거, replaceAll(), replace(), 정규식 연습
연습 function solution1(string) { let letter = ['a', 'e', 'i', 'o', 'u']; letter.map((e) => { string = string.replaceAll(e, ''); }); return string; } function solution2(string) { return string.replace(/[aeiou]/g, ''); } let string = ['Did you receive my purchase order?', 'Yes. I checked the e-mail just now.']; for (let i = 0; i < string.length; i++) { console.log('solution1', solution1(string[i]))..
2023. 9. 13.