JavaScript bank Fundamentals JavaScript / 44 questions Your progress 0 / 44 done Saved in this browser. Reset All 44 Easy 17 Medium 22 Hard 5 Hide done No questions match those filters. 01 What is JavaScript and how does it differ from Java, ECMAScript, and TypeScript? Easy 02 Explain the difference between compiled and interpreted languages. Where does JS fit, given JIT compilation? Medium 03 What are primitive vs reference types in JavaScript? How are they stored in memory? Easy 04 Explain the difference between == and === with concrete examples of type coercion pitfalls. Easy 05 What is NaN? Why does `NaN === NaN` return false, and how do you correctly check for NaN? Easy 06 Explain truthy and falsy values in JavaScript with a complete list of falsy values. Easy 07 What is the difference between `undefined` and `null`? When would you deliberately use each? Easy 08 Explain implicit type coercion rules for `+`, `-`, and comparison operators. Medium 09 What is the difference between synchronous and asynchronous code execution in JS? Easy 10 Explain strict mode (`'use strict'`) — what changes and why would you enable it? Medium 11 What are the differences between `var`, `let`, and `const` at a language-design level? Easy 12 How does JavaScript handle number precision? Explain why `0.1 + 0.2 !== 0.3`. Medium 13 What is the Immediately Invoked Function Expression (IIFE) pattern and why was it historically used? Easy 14 Explain the concept of first-class functions and give three practical implications. Easy 15 What is the difference between an expression and a statement in JavaScript? Medium 16 Explain function scope vs block scope vs lexical scope with examples. Easy 17 What is the Temporal Dead Zone (TDZ)? Show an example where it causes a ReferenceError. Medium 18 Why does `var` leak out of blocks (if/for) but `let`/`const` do not? Easy 19 Predict the output: a `for` loop with `var i` inside a `setTimeout`, vs the same with `let i`. Medium 20 What is variable shadowing? Give an example and explain resulting bugs. Medium 21 Explain global scope pollution and at least three ways to avoid it in a large codebase. Medium 22 What is the scope chain and how does JS resolve identifiers through it? Medium 23 Can you redeclare a `let` variable in the same scope? What error do you get and why? Easy 24 Explain how block-scoped functions behave differently in strict vs non-strict mode. Hard 25 What is the difference between lexical scoping and dynamic scoping? Does JS support both anywhere (hint: `this`)? Hard 26 Write code demonstrating scope pollution caused by accidental global assignment (missing `let`/`const`). Easy 27 How does the module scope in ES Modules differ from the top-level scope in a `<script>` tag? Medium 28 List all primitive types in JavaScript including the newest additions (BigInt, Symbol). Easy 29 Explain `typeof null === 'object'` — why is this considered a historical bug? Medium 30 What is BigInt and when would you need it over Number? Medium 31 Explain Symbol as a primitive type. What problem does it solve for object property keys? Medium 32 How does JavaScript perform type coercion between arrays, objects and primitives when using `+`? Medium 33 What is the difference between deep copy and shallow copy? Show how `structuredClone` differs from `JSON.parse(JSON.stringify())`. Medium 34 Explain how `Object.is()` differs from `===` for edge cases like `NaN` and `-0`. Medium 35 What are Typed Arrays and ArrayBuffer? When would a frontend engineer use them? Hard 36 Explain wrapper objects (`Number`, `String`, `Boolean`) and autoboxing of primitives. Medium 37 How would you reliably detect the type of any JavaScript value (array vs object vs null vs date)? Medium 38 What is hoisting? Explain how `var`, `let`, `const`, and function declarations are each hoisted differently. Easy 39 Predict the output of a function that reads a `var` before it's assigned, versus a `let` in the same position. Medium 40 Explain how function expressions assigned to `var`/`let` behave with hoisting compared to function declarations. Medium 41 What happens when you hoist a `class` declaration versus a `function` declaration? Explain the TDZ for classes. Hard 42 Explain hoisting in the context of nested functions and IIFEs. Medium 43 Why is it considered best practice to declare variables at the top of their scope even though hoisting exists? Easy 44 Trace through the two-phase execution model (creation phase and execution phase) explaining hoisting mechanics. Hard Next → Objects & OOP