OpenExamsFREE PRACTICE — ANY EXAM

Free JSA™ – Certified Associate JavaScript Programmer Practice Questions

100 free questions · Answer explanations · No signup required

View examination details, outline and sources

Loading selected examination banks…

Sample Practice Questions

Try these 10 sample questions from the JSA™ – Certified Associate JavaScript Programmer practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.

  1. 1Given `const level = 6; const cfg = { level };`, what is `cfg.level`?

    1. A.6Correct answer: A
    2. B.undefined
    3. C."level"
    4. D.ReferenceError

    Explanation: MDN states: "const o = { a, b, c };" Shorthand uses the variable's name as the key and its value as the property value.

    Reference: MDN Web Docs — Object initializer — Shorthand property names

  2. 2What happens when `new Task(); class Task {}` is evaluated in that order?

    1. A.ReferenceErrorCorrect answer: A
    2. B.A Task instance is created
    3. C.undefined is returned
    4. D.SyntaxError

    Explanation: MDN states: "class declarations have the same temporal dead zone restrictions as let or const" The class binding cannot be used before initialization; the code is syntactically valid.

    Reference: MDN Web Docs — Classes — Defining classes

  3. 3What does `Number(' ')` return?

    1. A.NaN
    2. B.undefined
    3. C.0Correct answer: C
    4. D.TypeError

    Explanation: MDN states: "Empty or whitespace-only strings are converted to 0." Whitespace-only input converts to zero rather than failing conversion.

    Reference: MDN Web Docs — Number — Number coercion

  4. 4For `function f(x=9){return x;}`, what is `f(null)`?

    1. A.9
    2. B.undefined
    3. C.nullCorrect answer: C
    4. D.0

    Explanation: MDN states: "though not null or other falsy values" The default replaces missing or undefined values, not an explicit null.

    Reference: MDN Web Docs — Default parameters — Passing undefined vs. other falsy values

  5. 5What is `({ mode: 1, mode: 4 }).mode`?

    1. A.1
    2. B.4Correct answer: B
    3. C.[1, 4]
    4. D.SyntaxError

    Explanation: MDN states: "When using the same name for your properties, the second property will overwrite the first." The later ordinary property definition replaces the earlier value; it does not accumulate values or cause an error.

    Reference: MDN Web Docs — Object initializer — Duplicate property names

  6. 6Which declaration stores an anonymous class in `Model`?

    1. A.const Model = class();
    2. B.const Model = class {};Correct answer: B
    3. C.class = Model {};
    4. D.const class Model = {};

    Explanation: MDN states: "a class can be defined in two ways: a class expression or a class declaration." The class expression can be assigned to a variable. The other forms are not valid class syntax.

    Reference: MDN Web Docs — Classes — Defining classes

  7. 7What type does `(12.5).toFixed(2)` return?

    1. A.number
    2. B.Number object
    3. C.array
    4. D.stringCorrect answer: D

    Explanation: MDN states: "Returns a string representing the number in fixed-point notation." Formatting produces text, not a rounded numeric primitive or wrapper.

    Reference: MDN Web Docs — Number — Instance methods; toFixed

  8. 8What is `rest` in `function f(first,...rest){return rest;} f(1,2,3)`?

    1. A.[1,2,3]
    2. B.3
    3. C.{0:2,1:3}
    4. D.[2,3]Correct answer: D

    Explanation: MDN states: "The rest parameter syntax allows us to represent an indefinite number of arguments as an array." Rest collects remaining arguments after first; it is a genuine array, not the arguments-like object.

    Reference: MDN Web Docs — Functions — Rest parameters

  9. 9What is `last.n` after `let n = 0; function make(){ return {n: ++n}; } const first = make(); const last = make();`?

    1. A.0
    2. B.1
    3. C.2Correct answer: C
    4. D.undefined

    Explanation: MDN states: "each object initializer results in a new object being created whenever the statement in which it appears is executed." The expression ++n is evaluated on each creation, giving 1 then 2, rather than capturing a single initial value.

    Reference: MDN Web Docs — Working with objects — Creating new objects; Using object initializers

  10. 10Which mode applies to code inside a JavaScript class body?

    1. A.The caller's mode
    2. B.Non-strict mode
    3. C.Strict modeCorrect answer: C
    4. D.Strict mode only in modules

    Explanation: MDN states: "The body of a class is executed in strict mode" Class syntax supplies strict semantics without requiring a directive or module.

    Reference: MDN Web Docs — Classes — Class body

Exam Review

About JSA™ – Certified Associate JavaScript Programmer

JSA™ – Certified Associate JavaScript Programmer · UNSPECIFIED

Key exam facts

Provider
OpenEDG JS Institute (run and managed by OpenEDG); delivery through OpenEDG Testing Service TestNow, Pearson VUE test centers and OnVUE.
Format
Computer-delivered single-select and multiple-select items; TestNow online, OnVUE online proctored or Pearson VUE on-site proctored.
Exam questions
Total questions: 40.
Time limit
60 minutes answering time plus 5 minutes Tutorial/NDA (65 minutes total).
Passing score
At least 70% cumulative across all blocks; raw score normalized to percentage.
Exam fee
Exam from USD 295; exam plus retake from USD 345. Starting prices, not a universal fixed fee.

Topics covered

  • Classless Objects (25%)

    • 1.1 Create Individual Objects (1) | Objective 1.1.1 Create objects using literals | Declare objects with literal syntax and initialize fields.
    • 1.2 Object Properties (1) | Objective 1.2.1 Explain and use object properties | Add, modify, and delete properties safely. | Work with nested properties and optional access patterns.
    • 1.3 Dot vs. Bracket Notation (1) | Objective 1.3.1 Compare and contrast dot and bracket notations | Prefer dot notation for standard identifiers. | Use bracket notation for multi-word, dynamic, or computed keys.
    • 1.4 Property Existence & Enumeration (1) | Objective 1.4.1 Test property existence and perform enumeration | Check membership with the in operator and safe access. | Iterate keys via for...in with filtering for own props. | Use Object.keys(), Object.values(), Object.entries() for iteration.
    • 1.5 Comparing Objects (1) | Objective 1.5.1 Compare and contrast objects | Distinguish reference equality from deep structural comparison. | Reason about identity vs. value equivalence.
    • 1.6 Copying & Cloning (1) | Objective 1.6.1 Implement object copying mechanisms | Copy references vs. clone values. | Apply Object.assign() and spread for shallow clones. | Understand deep cloning strategies and caveats.
    • 1.7 Methods & this (1) | Objective 1.7.1 Explain and implement methods in code | Store functions as properties and define methods in literals. | Add methods to existing objects when appropriate. | Use this correctly in method contexts.
    • 1.8 Getters & Setters (1) | Objective 1.8.1 Explain and implement getters and setters | Declare accessor properties with get and set. | Use accessors to validate or compute fields.
    • 1.9 Object Configuration (1) | Objective 1.9.1 Organize and configure objects and properties | Set descriptors with Object.defineProperty(). | Control mutability via Object.preventExtensions(), Object.seal(), and Object.freeze().
    • 1.10 Creating Classless Objects (1) | Objective 1.10.1 Demonstrate different ways to create classless objects | Apply factory functions for custom initialization. | Use constructor functions with new when needed. | Create objects via Object.create() with explicit prototypes.
    • 1.11 Prototypes (1) | Objective 1.11.1 Explain and apply the concept of prototypes | Reason about prototype-based inheritance links. | Recognize __proto__/[[Prototype]] and Function.prototype. | Set prototypes via Object.setPrototypeOf() when required.
  • Classes & Class-Based Approach (23%)

    • 2.1 Class Declarations (1) | Objective 2.1.1 Design classes and implement class declarations | Declare classes with class and define constructor, fields, and methods. | Use class expressions and treat classes as first-class values.
    • 2.2 Instantiation & Type Checks (1) | Objective 2.2.1 Create objects from classes | Instantiate with new and verify relationships with instanceof.
    • 2.3 Class Fields (1) | Objective 2.3.1 Explain and use class properties | Initialize fields in the constructor or via class field syntax.
    • 2.4 Accessors in Classes (1) | Objective 2.4.1 Create and implement getters and setters | Expose computed/validated state with get/set in class bodies.
    • 2.5 Inheritance (1) | Objective 2.5.1 Explain and apply the concept of inheritance | Extend classes with extends and override members safely. | Call parent logic via super in constructors and methods.
    • 2.6 Static Members (1) | Objective 2.6.1 Explain and apply static members in code | Define/access static methods and properties on the class itself.
    • 2.7 Classes vs. Constructors (1) | Objective 2.7.1 Compare and contrast classes and constructors | Relate class syntax to constructor functions and prototype methods.
  • Built-in Objects (27%)

    • 3.1 Number (1) | Objective 3.1.1 Explain and use the Number constructor | Convert to/from numeric strings and formats. | Use key static props/methods and formatting APIs.
    • 3.2 String (1) | Objective 3.2.1 Explain and use the String constructor | Treat strings as sequences; perform case, split, find/replace, pad/trim, and compare.
    • 3.3 Date (1) | Objective 3.3.1 Explain and use the Date constructor | Construct dates, read/write components, and measure elapsed time. | Handle local time vs. UTC considerations.
    • 3.4 Arrays (1) | Objective 3.4.1 Describe and implement the concept of arrays | Create/merge; add/remove; slice/splice; spread and destructure.
    • 3.5 Advanced Array Methods (1) | Objective 3.5.1 Explain and implement advanced array methods | Apply find, every, some, filter, sort, map, reduce.
    • 3.6 Set (1) | Objective 3.6.1 Explain, implement, and process Set collections | Construct; add/has/delete/clear/size; iterate; spread.
    • 3.7 Map (1) | Objective 3.7.1 Explain, implement, and process Map collections | Construct; set/get/has/delete/clear/size; iterate key–value pairs.
    • 3.8 Objects as Data Structures (1) | Objective 3.8.1 Implement objects as data structures | Use plain objects as dictionaries; manage items and iterate entries.
    • 3.9 JSON (1) | Objective 3.9.1 Use the JSON object to process data | Serialize with JSON.stringify and parse with JSON.parse.
    • 3.10 Math (1) | Objective 3.10.1 Use the Math object to perform operations | Apply ceil, floor, round, random, min, max, abs, pow, log and trigonometry.
    • 3.11 Regular Expressions (1) | Objective 3.11.1 Explain and apply the concept of regular expressions | Declare via RegExp or literals; use test, exec, match, search, replace.
    • 3.12 Extending Built-ins (1) | Objective 3.12.1 Explain and implement the concept of extending built-in types | Add methods via prototypes responsibly; understand risks.
  • Advanced Functions (25%)

    • 4.1 Parameters & Arguments (1) | Objective 4.1.1 Organize and implement extended function parameter handling | Use default values, rest parameters, and spread. | Simulate named parameters with objects/destructuring.
    • 4.2 Closures & IIFEs (1) | Objective 4.2.1 Explain and use closures and IIFEs | Leverage closure over lexical environment. | Apply Immediately Invoked Function Expressions.
    • 4.3 Call Forwarding & Context (1) | Objective 4.3.1 Implement the mechanism for call forwarding | Manage this and use call, apply, bind.
    • 4.4 Function Decorators (1) | Objective 4.4.1 Implement the mechanism for decorating functions | Compose wrappers/higher-order functions; pass/return functions.
    • 4.5 Generators & Iterators (1) | Objective 4.5.1 Explain, create, and implement generators and iterators | Define generator functions; iterate with for...of. | Implement custom iterables/iterators.
    • 4.6 Async with Callbacks (1) | Objective 4.6.1 Explain, organize, and handle asynchronous events using callbacks | Model async flows and handle errors/callback conventions.
    • 4.7 Promises (1) | Objective 4.7.1 Explain and apply the concept of promises | Create promises and handle with then, catch, finally.
    • 4.8 Promise Patterns (1) | Objective 4.8.1 Explain and apply advanced promise chaining techniques | Chain sequences; use Promise.all, Promise.any, Promise.race.
    • 4.9 async/await (1) | Objective 4.9.1 Use async and await to handle promises | Write async functions; await results; manage errors with try/catch.
    • 4.10 Network Requests (1) | Objective 4.10.1 Understand and implement asynchronous handling of network requests | Retrieve data using XMLHttpRequest and the Fetch API with proper async handling.

How to prepare

Work through the topics, read the explanation after each answer, and revisit the areas where you miss questions. Use the official outline and reference materials below to guide your study.

These independent practice questions are not actual exam items and do not guarantee a passing result.

Frequently asked questions

What is the exam format?

Computer-delivered single-select and multiple-select items; TestNow online, OnVUE online proctored or Pearson VUE on-site proctored.

How many questions are on the exam?

Total questions: 40.

How long is the exam?

60 minutes answering time plus 5 minutes Tutorial/NDA (65 minutes total).

What is the passing score?

At least 70% cumulative across all blocks; raw score normalized to percentage.

How much does the exam cost?

Exam from USD 295; exam plus retake from USD 345. Starting prices, not a universal fixed fee.

Official sources and references

Confirm current exam arrangements with the exam provider.