JavaScript

JavaScript Quizzes

Learn JavaScript with our quiz and test exercises. Practice writing code for web pages, working with functions, and handling events. These quizzes help your understanding of JavaScript basics and will test your ability to build interactive websites.

47 quizzes
2115 questions

About JavaScript Quiz

Each JavaScript quiz consists of multiple questions, each with three to four possible answers. Only one answer is correct for each question. Select the answer you believe is correct, then click the "Check My Answers" button to see your results.

If you answer at least 75% of the questions correctly, you pass the quiz! This indicates you have a solid understanding of JavaScript concepts and are ready to advance to more challenging topics.

After submitting your quiz, you'll receive immediate feedback with detailed explanations for each question. This helps you understand not just what the correct answer is, but why it's correct—reinforcing your learning and helping you master JavaScript.

Quick Tips

  • Read each question carefully before selecting your answer
  • Review the code examples when provided
  • You can retake quizzes as many times as you want
  • Sign in to save your progress and track your performance
How to Use Quizibadu

Available Quizzes

1
40 questions

Basics

A beginner-friendly quiz to evaluate your understanding of core JavaScript fundamentals including variables, data types, operators, and foundational syntax. This quiz builds the base for mastering more advanced JavaScript concepts.

2
50 questions

Variables & Data Types

A focused JavaScript quiz dedicated to variables, scope, primitive values, reference types, and type conversion. Use this set to check how well you understand declarations, assignments, comparison rules, and everyday runtime behaviour.

3
50 questions

Operators & Expressions

A detailed JavaScript quiz exploring arithmetic, comparison, logical, bitwise, and assignment operators through practical expressions and tricky evaluation scenarios.

4
75 questions

Strings & String Methods

Tackle 75 JavaScript string challenges that cover formatting, slicing, searching, pattern matching, and Unicode-safe manipulation to solidify everyday text-processing skills.

5
75 questions

Numbers & Math Operations

Master 75 JavaScript questions that cover numeric literals, parsing, formatting, math utilities, and the edge cases every engineer hits when working with numbers.

6
100 questions

Arrays & Basic Array Methods

Tackle 100 JavaScript array questions that range from everyday indexing to tricky splice mutations and iteration strategies. Forty questions supply runnable code so you can reason through exact behaviour before answering.

7
75 questions

Objects & Key/Value Manipulation

Explore 75 JavaScript object questions that cover construction, property access, mutation, introspection, cloning, and immutability. Thirty questions include runnable snippets so you can reason through exact behaviour before answering.

8
50 questions

Control Flow (if, else, switch)

Explore 50 JavaScript control-flow questions covering branching, truthiness, equality pitfalls, nested decisions, switch mechanics, fallthrough, and short-circuit expressions. Twenty questions include runnable snippets so you can reason about exact evaluation before answering.

9
50 questions

Functions & Parameters

Explore 50 JavaScript function questions covering declarations, expressions, arrow functions, scopes, parameters, defaults, rest arguments, return values, closures, and execution flow.

10
50 questions

Boolean Logic & Truthy/Falsy

Explore 50 JavaScript questions covering boolean values, logical operators, comparison pitfalls, truthy/falsy coercion, short-circuit flow, optional chaining, nullish coalescing, ternaries, and real-world conditional patterns.

11
50 questions

Type Conversion & Coercion

Explore 50 JavaScript questions that test implicit coercion, explicit casts, string and number conversions, truthy/falsy evaluations, equality quirks, arithmetic side effects, ToPrimitive algorithms, JSON behavior, and the most common pitfalls developers hit when the engine reshapes data types.

12
40 questions

Basic Error Types (SyntaxError, TypeError)

Explore 40 JavaScript questions covering SyntaxError definitions, parsing mistakes, prevention strategies, TypeError causes, undefined versus null access issues, strict mode implications, debugging stacks, try/catch usage, and best practices for runtime resilience.

13
40 questions

Console API (log, error, table)

Explore 40 questions that cover console.log, console.error, console.table, message formatting, styling, grouping, timing, assertions, debugging workflows, clearing output, and practical logging best practices in JavaScript.

14
30 questions

Basic Debugging in Browser DevTools

Understand 30 questions covering how to open DevTools, inspect the DOM, use the console, set and manage breakpoints, step through code, inspect the call stack, monitor network calls, leverage overrides, analyze performance and memory, debug event listeners, and work in responsive design mode.

15
50 questions

Math Object & Random Numbers

Explore 50 JavaScript questions covering Math constants, rounding methods, min/max, exponentiation, roots, absolute values, sign detection, trig/log functions, random generation, range helpers, conceptual seeding, randomization patterns, and performance tips for numerical code.

16
40 questions

Array Iteration Essentials (forEach)

Cover 40 questions on how Array.forEach works, callback parameters, side effects, mutation patterns, differences versus loops and map/filter, thisArg usage, arrow callbacks, early-exit limitations, nested iterations, object handling, common patterns, debugging techniques, and best practices.

17
50 questions

Basic Date Handling (Date object)

Answer 50 questions on JavaScript Date basics: creating instances, timestamps, extracting components, setting values, parsing strings, basic formatting, Date.now, arithmetic, time zones, UTC helpers, comparisons, ISO conversion, and common pitfalls.

18
40 questions

Intro to DOM (querySelector & textContent)

Answer 40 questions covering DOM fundamentals, document structure, element selection with querySelector/querySelectorAll, CSS selector usage, reading and updating textContent, handling null results, safe DOM manipulation, and best practices.

19
75 questions

Prototype & Inheritance

Tackle 75 questions covering prototype chain fundamentals, __proto__ vs prototype, constructor functions, adding and overriding prototype methods, Object.create patterns, class syntax with extends/super, distinguishing instance vs prototype data, checking inheritance relationships, understanding this, performance considerations, pitfalls, and best practices.

20
50 questions

Classes & OOP

Work through 50 questions on class syntax, constructors, instance and static members, getters/setters, inheritance with extends/super, private fields, composition vs inheritance, using this, creating multiple instances, basic design patterns, and best practices.

21
50 questions

Modules (import/export)

Answer 50 questions on ES modules: named vs default exports, import syntax variations, renaming, exporting functions/classes/constants, re-exporting, module scope, namespace imports, dynamic import(), browser/module loading, resolution rules, Node.js ESM/CommonJS, bundling basics, and best practices.

22
40 questions

Error Handling (try, catch, finally)

Tackle 40 questions on why try/catch exists, how to structure catch/finally blocks, inspecting error objects, throwing custom errors, handling specific cases, nesting handlers, and modern best practices.

23
75 questions

Asynchronous JS (Callbacks)

Answer 75 questions on asynchronous JavaScript callbacks: fundamentals, error-first patterns, execution order, callback hell, timers, DOM and I/O callbacks, higher-order functions, data passing, chaining, and modern replacements like Promises.

24
40 questions

Promises & Promise Chaining

Tackle 40 questions about JavaScript Promises: states, creating promises, then/catch/finally, value chaining, error propagation, avoiding callback hell, Promise.all, Promise.race, and coordinating multiple async operations.

25
40 questions

Async/Await Deep Understanding

Answer 40 questions on async/await internals: how async functions work, await behavior, try/catch error handling, sequential vs parallel flows, awaiting multiple promises, mixing with raw promises, event loop interaction, return values, pitfalls, and best practices.

26
40 questions

Execution Context

Dive into 40 questions covering how JavaScript builds global and function execution contexts, creation and execution phases, lexical and variable environments, scope chains, hoisting, this binding, and call stack behavior.

27
40 questions

Hoisting & Temporal Dead Zone

Tackle 40 questions covering hoisting concepts, var behavior, function declaration hoisting, function expressions, let/const characteristics, temporal dead zone pitfalls, runtime errors, and best practices.

28
40 questions

Closures & Lexical Environment

Study 40 JavaScript questions on lexical scoping, scope chains, closure creation, accessing outer variables, state preservation, memory considerations, and avoiding accidental closures.

29
30 questions

Scope Types (Global, Block, Function)

Learn 30 questions that analyze JavaScript global scope, function scope, block scope, var quirks, visibility rules, shadowing, scope chains, and best practices for managing identifiers.

30
50 questions

Event Loop & Microtasks Introduction

Answer 50 questions about the JavaScript event loop, call stack, macrotasks, microtasks, promise timing, rendering, async APIs, starvation risks, and debugging workflows.

31
35 questions

Advanced Array Methods (map, filter, reduce)

Answer 35 questions that dive into map transformations, filter logic, reduce accumulations, callback signatures, immutability, chaining, patterns, performance trade-offs, and behavior comparisons.

32
35 questions

Spread & Rest Operator Deep Usage

Answer 35 questions exploring spread on arrays and objects, cloning behavior, combining collections, rest parameters, destructuring techniques, pitfalls, performance trade-offs, and modern practical patterns.

33
30 questions

6 Destructuring Use Cases (Nested, Default)

Tackle 30 questions on nested object/array destructuring, defaults, renaming bindings, destructuring parameters, and skipping positions.

34
35 questions

Template Literals Advanced (Tagged Templates)

Answer 35 questions digging into template literal basics, tagged function mechanics, string/value processing, security sanitization, custom formatting, localization, DSL construction, and performance trade-offs.

35
35 questions

Regular Expressions Basics

Answer 35 questions covering regex literal vs constructor syntax, metacharacters, character classes, quantifiers, anchors, grouping, escaping, and JS testing/matching methods.

36
30 questions

Shallow vs Deep Copying Objects

Answer 30 questions comparing shallow copy techniques, deep copy strategies, spread/Object.assign behavior, JSON and structuredClone approaches, reference vs value semantics, and common pitfalls like cyclic structures.

37
40 questions

JSON Handling (stringify, parse pitfalls)

Answer 40 questions covering JSON.stringify basics, JSON.parse behavior, handling undefined and functions, circular structure errors, Date serialization, number precision, reviver/replacer usage, and safe parsing practices.

38
30 questions

DOM Events Bubbling & Capturing

Answer 30 questions on event propagation phases, capturing basics, target behavior, bubbling mechanics, addEventListener options, stopping propagation, preventing default actions, and event delegation techniques.

39
35 questions

Performance Optimization Techniques

Answer 35 questions on minimizing reflows, debouncing/throttling, faster loops, efficient structures, avoiding leaks, web workers, lazy loading, caching, cutting re-renders, and profiling with DevTools.

40
35 questions

Iterators & Generators (yield, next, custom iterators)

Answer 35 questions covering iterator protocol basics, next() behavior, iterable objects, generator syntax, yield mechanics, execution control, passing values, custom iterators, lazy generator use cases, and async-iterator differences.

41
35 questions

Async Iteration & for-await-of

Answer 35 questions covering the async iterator protocol, Symbol.asyncIterator, async generator syntax, yield vs yield*, promise handling, for-await-of mechanics, error management, streaming data scenarios, and using async generators with fetch.

42
35 questions

Debounce & Throttle Patterns

Answer 35 questions covering debounce timing, throttle intervals, leading/trailing triggers, preventing noisy events, scroll/input use cases, manual implementations, pitfalls, and UI performance gains.

43
35 questions

Shadow DOM & Web Components Basics

Answer 35 questions on custom element fundamentals, shadow DOM encapsulation, open vs closed roots, templates and slots, style isolation, lifecycle callbacks, reusable component design, and light/shadow DOM interaction.

44
35 questions

Intersection Observer

Answer 35 questions covering observers and targets, threshold/rootMargin tuning, lazy-loading patterns, visibility detection, cleanup best practices, entry properties, performance wins vs scroll events, and common use cases like infinite scroll, animations, and analytics.

45
35 questions

MutationObserver: Watching DOM Changes

Test your knowledge with 35 questions on MutationObserver—covering DOM observation, configuration options, attribute and child tracking, subtree monitoring, mutation records, cleanup, performance, and real-world use cases.

46
35 questions

Browser Rendering Pipeline

Test your understanding of how browsers render web pages with 35 questions covering HTML/CSS/JS parsing, the Critical Rendering Path, layout, painting, compositing, and performance optimizations.

47
40 questions

Security Basics

Test your knowledge with 40 questions on web security fundamentals—covering XSS types, prevention strategies, CSRF mechanics, and defense techniques like tokens, SameSite cookies, and Content Security Policy.

YOUR PROGRESS

0%
Complete
Completed
0/0
Not Passed
0/0
Not Started
0/0
Sign in to view Progress