
slice() | substring() | substr() ๋ฉ์๋ slice() slice() ๋ฉ์๋๋ ๋ฌธ์์ด์์ ์ํ๋ ๊ฐ์ ์ถ์ถํ์ฌ ์๋ก์ด ๋ฌธ์์ด์ ๋ฐํํฉ๋๋ค. //slice(์์์์น, ๋๋๋ ์์น) //์์์์น < ๋๋๋ ์์น const str1 = "javascript reference"; const currentStr1 = str1.slice(0); //javascript reference const currentStr2 = str1.slice(1); //avascript reference const currentStr3 = str1.slice(2); //vascript reference const currentStr4 = str1.slice(0,1); //j const currentStr5 =..
Javascript
2022. 8. 16. 16:14
๊ณต์ง์ฌํญ