console.log(10 + 5) // 15
console.log('10' + '5') // 105
console.log(String(10) + String(5)) // 105
console.log(number('10') number('5')) // 15
숫자 -> 문자
let x = 123
console.log(x); // 123
console.log(String(x)); // '123'
console.log(type of x); // number
console.log(type of String(x)); // string
불린 -> 문자
let y = true;
console.log(y); // true
console.log(String(y)); // 'true'
console.log(type of y); // boolean
console.log(type of String(y)); // string
문자 -> 숫자
let x = '123';
console.log(x); // '123'
console.log(Number(x)); // 123
console.log(type of x); // string
console.log(type of String(x)); // number
불린 -> 숫자
let y = true;
console.log(y); // true
console.log(Number(y)); // 1 , false 는 0
console.log(type of y); // boolean
console.log(type of Number(y)); // number
문자 -> 불린
let x = '문자';
console.log(x); // '문자'
console.log(Boolean(x)); // true
console.log(type of x); // string
console.log(type of Boolean(x)); // boolean
숫자 -> 불린
let y = 123;
console.log(y); // 123
console.log(Boolean(y)); // true
console.log(type of y); // number
console.log(type of Boolean(y)); // boolean
boolean 값으로 참이 나오는 데이터 타입을 Truthy, 거짓이 나오는 데이터 타입을 Falsy 라고 한다.