Length1 [TIL] 문자열(String) 메소드: length, indexOf, substring, slice, split, includes, toLowerCase(), toUpperCase(), 2021.3.3 str[index] : 한 글자씩 index의 글자를 가져온다. let str = 'hello world'; console.log(str[0]); //h console.log(str[1]); //e console.log(str[100]); //undefined concatenating strings: + 연산자를 통해 string 타입과 다른 타입을 +연산자를 통해 concat할 경우 string 타입으로 변환된다. let str1 = 'hello'; let str2 = 'world'; console.log(str1+str2); //helloworld console.log(1+'1'); // 11 console.log(str1+'3'); hello3 str.length: 문자열의 전체 길.. 2021. 3. 3. 이전 1 다음