
typeof (variable) 로 나타낸다.const age = prompt("How old are you?");
console.log(typeof age);
string

parseInt: string 형태의 변수를 number 형태로 변환해준다.const age = prompt("How old are you?");
console.log(typeof age, typeof parseInt(age));
string number
입력값이 string에서 number로 형변환 되었음을 알 수 있다.