Javascript
[Javascript] 알파벳 대소문자 변환 - toUpperCase() / toLowerCare()
쭈꾸미
2022. 2. 5. 22:23
toUpperCase()
toUpperCase는 문자열을 대문자로 변환해 반환한다.
const sentence = 'The quick brown fox jumps over the lazy dog.';
console.log(sentence.toUpperCase());
// expected output: "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
toLowerCase()
toLowerCase는 문자열을 소문자로 변환해 반환한다.
const sentence = 'The quick brown fox jumps over the lazy dog.';
console.log(sentence.toLowerCase());
// expected output: "the quick brown fox jumps over the lazy dog."