본문 바로가기

공부/입문자를 위한 Javascript 알고리즘 이론+실습

[section-03]number-string (typeof - 계산기가 이상해)

[인프런x코드캠프] 입문자를 위한 Javascript 알고리즘 이론+실습 강의를 들으며 풀어본 문제들

(출처는 아래 링크)

 

[인프런x코드캠프] 입문자를 위한 Javascript 알고리즘 이론+실습

 

 

function solution(num1, num2) {
  return typeof num1 + " " + typeof num2;
}

solution("9", 10); // string number
solution(19, 1); // number number
solution("2", "14"); // string string