728x90
๋ฐ์ํ
06. tooUpperCase() / toLowerCase()
toUpperCase() : ๋ฌธ์์ด์ ๋๋ฌธ์๋ก ๋ณ๊ฒฝํฉ๋๋ค.
toLowerCase() : ๋ฌธ์์ด์ ์๋ฌธ์๋ก ๋ณ๊ฒฝํฉ๋๋ค.
๋ฒํธ | ๊ธฐ๋ณธ๊ฐ | ๋ฉ์๋ | ๋ฆฌํด๊ฐ |
---|---|---|---|
const str1 = "javascript";
const currentStr1 = str1.toUpperCase();
document.querySelector(".sample06_N1").innerHTML = "1";
document.querySelector(".sample06_Q1").innerHTML = "javascript";
document.querySelector(".sample06_M1").innerHTML = "toUpperCase()";
document.querySelector(".sample06_P1").innerHTML = currentStr1;
const str2 = "JAVASCRIPT";
const currentStr2 = str2.toLowerCase();
document.querySelector(".sample06_N2").innerHTML = "2";
document.querySelector(".sample06_Q2").innerHTML = "JAVASCRIPT";
document.querySelector(".sample06_M2").innerHTML = "toLowerCase()";
document.querySelector(".sample06_P2").innerHTML = currentStr2;
728x90
๋ฐ์ํ
'์๋ฐ์คํฌ๋ฆฝํธ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
trim() / trimStart() / trimEnd() (4) | 2022.08.17 |
---|---|
๋ฌธ์์ด ๊ฒฐํฉ / ํ ํ๋ฆฟ ๋ฌธ์์ด (3) | 2022.08.17 |
์ ๊ทํํ์ (4) | 2022.08.17 |
slice() / substring() / substr() (6) | 2022.08.17 |
indexOf()/lastIndexOf() (6) | 2022.08.17 |
๋๊ธ