About this JavaScript quiz
Guess the Output is a short JavaScript quiz built around the language's most repeated interview traps. Each question shows a real snippet — usually a console.log() — and four possible outputs, exactly one of which is correct. When you pick, the right answer turns green, a wrong pick turns red, and a one or two sentence explanation tells you which rule produced that result. Your running score, current streak and progress through the 18 questions stay visible at the top, and your best score is remembered in your browser with localStorage.
The questions deliberately cluster around a handful of mechanics that account for most "wait, what?" moments in JavaScript: the ToPrimitive and abstract-equality coercion rules behind [] + {}, "" == 0 and [] == ![]; IEEE 754 floating point and 0.1 + 0.2; hoisting and the temporal dead zone; var captured by a closure inside a loop; how this is resolved at the call site and why arrow functions differ; typeof null and typeof typeof 1; parseInt radix with map; and the order the call stack, microtask queue and setTimeout run in. It runs entirely in your browser, needs no signup, and works on mobile.
이 자바스크립트 퀴즈 소개
출력값 맞히기는 자바스크립트 면접에서 가장 자주 나오는 함정들로 만든 짧은 퀴즈입니다. 각 문제는 실제 코드 조각(대부분 console.log())과 4개의 보기를 보여주며, 정답은 하나뿐입니다. 답을 고르면 정답은 초록색, 틀린 선택은 빨간색으로 표시되고, 어떤 규칙 때문에 그 결과가 나오는지 1~2문장으로 설명합니다. 현재 점수, 연속 정답(스트릭), 18문제 진행 상황이 상단에 계속 표시되며, 최고 점수는 localStorage로 브라우저에 저장됩니다.
문제들은 자바스크립트에서 "어? 왜 이러지?" 하는 순간을 만드는 몇 가지 핵심 동작에 집중합니다: [] + {}, "" == 0, [] == ![] 뒤에 있는 ToPrimitive와 추상 동등 비교 규칙, IEEE 754 부동소수점과 0.1 + 0.2, 호이스팅과 일시적 사각지대, 반복문 안에서 클로저에 붙잡히는 var, 호출 위치에 따라 결정되는 this와 화살표 함수의 차이, typeof null과 typeof typeof 1, map과 함께 쓰는 parseInt의 진법, 그리고 콜 스택·마이크로태스크 큐·setTimeout의 실행 순서입니다. 가입 없이 브라우저에서 바로 실행되고 모바일에서도 작동합니다.