[…문자열];
Array.from(문자열);
문자열.split(””);
let str = "수박수박";
let toArr1 = [...str];
let toArr2 = Array.from(str);
let toArr3 = str.split("");
console.log(toArr1); // ['수', '박', '수', '박']
console.log(toArr2); // ['수', '박', '수', '박']
console.log(toArr3); // ['수', '박', '수', '박']
숫자.toString();
String(숫자);
(숫자 + “”);
let n = 123;
let toStr1 = n.toString();
let toStr2 = String(n);
let toStr3 = (n + "");
console.log(toStr1); // '123'
console.log(toStr2); // '123'
console.log(toStr3); // '123'
parseInt(문자열)
Number(문자열);
let s = "123";
console.log(parseInt(s)) // 123
console.log(Number(s)) // 123