JavaScript
Javascript 문자열 대소문자 변환 (toLowerCase, toUpperCase)
ITSkeleton
2020. 6. 9. 21:04
728x90
반응형
1. toLowerCase
문자열을 모두 소문자로 변환합니다
const text = 'HELLO';
console.log(text.toLowerCase());
// 결과: hello
2. toUpperCase
문자열을 모두 대문자로 변환합니다
const text = 'hello';
console.log(text.toUpperCase());
// 결과: HELLO
728x90
반응형