๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ

toUpperCase() / toLowerCase()

by Youcodein 2022. 8. 17.
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
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€