JS-Dev-101 Salesforce Certified JavaScript Developer Exam Topics and Questions
These Salesforce Certified JavaScript Developer (JS-Dev-101) exam topics are organized according to official exam domains to help candidates quickly verify coverage and focus on assessment rather than theory. Each domain is paired with topic-wise JS-Dev-101 sample questions that reflect how objectives are tested in the actual exam. This structure enables efficient review, targeted self-assessment, and rapid identification of weak areas when preparing for the Salesforce Certified JavaScript Developer certification exam.
Let's Practice Free Salesforce JS-Dev-101 Questions Aligned with Official Exam Topics
This is the heaviest topic on the exam and the foundation for everything else. You need to show that you can declare, initialise, and manipulate data without stepping on type coercion traps or misunderstanding how JavaScript evaluates truthiness. The cost comes in the detail: knowing when a variable becomes undefined, how a string method differs from a number method, and why an array operation returns what it does. β Declaration, initialisation, and type behaviour You must know when to use...
This is the heaviest topic on the exam and the foundation for everything else. You need to show that you can declare, initialise, and manipulate data without stepping on type coercion traps or misunderstanding how JavaScript evaluates truthiness. The cost comes in the detail: knowing when a variable becomes undefined, how a string method differs from a number method, and why an array operation returns what it does.
β Declaration, initialisation, and type behaviour
You must know when to use let, const, or var, and what happens when you fail to initialise a variable before using it. Type coercion appears wherever operators mix strings and numbers, and the exam expects you to predict the outcome without running the code. Strings, numbers, and dates each carry their own method sets, and you need to choose the right one for the business requirement. A common mistake is assuming that adding a string and a number will throw an error; instead, JavaScript coerces silently and produces a result you did not intend. Date manipulation is tested through scenario-based questions where you calculate intervals or format output, and the subtlety lies in recognising which Date method returns a zero-indexed month and which does not.
β Truthiness, falsiness, and conditional logic
JavaScript has six falsy values: false, 0, empty string, null, undefined, and NaN. Everything else is truthy, including empty arrays and empty objects. The exam tests this in conditional branches where the candidate must predict which block executes. A question might present a variable set to an empty array and ask whether an if statement treats it as true or false. The answer is true, but candidates who reason from other languages often get this wrong. Another trap is the difference between loose equality and strict equality: knowing when double equals coerces and when triple equals does not is essential for reading code that checks user input or API responses.
β Arrays and JSON operations
Array manipulation means knowing which methods mutate the original array and which return a new one. Map, filter, and reduce are common, and you need to write or read a callback that transforms data correctly. The exam presents a list and asks you to extract, sort, or aggregate it, often in combination with a business rule about what counts as valid. JSON operations focus on parse and stringify, and the scenario typically involves an API response that must be read or prepared for transmission. A frequent error is attempting to call array methods on a JSON string before parsing it, or assuming that JSON.parse will silently ignore malformed input rather than throwing an error.
How Variables, Types, and Collections is tested
With twenty-three percent of the exam, this topic generates the most items and the widest variety of scenario styles. You will see code snippets where a variable is declared in one scope and referenced in another, and you must identify whether the reference succeeds or throws. Type coercion appears in expressions that mix operators, and the question asks what the final value is, not whether the code runs. Truthy and falsy evaluations are tested through conditional statements where the candidate must trace which branch executes. Array questions present a dataset and a requirement, then ask which method or chain of methods satisfies it. JSON questions show a response object and ask how to extract a nested property or prepare a payload. Marks are lost when candidates confuse mutation with immutability, when they forget that an empty array is truthy, or when they apply a string method to a number without coercing first. The detail level is high, and the exam rewards candidates who have written enough JavaScript to internalise these behaviours rather than memorising rules.
A practice test lets you see how the exam phrases type coercion and truthiness questions before you pay for the full attempt. The PDF version of the question bank gives you every item on variables, arrays, and JSON in one place, so you can work through the topic systematically and spot patterns in how Salesforce structures the scenarios.
The question below asks you to predict the outcome of a type coercion scenario. Read the code carefully and decide what the expression evaluates to.
Given the following code:
01 let x = null;
02 console.log(typeof x);
What is the output of line 02?
This is the single largest topic by weight, and it measures whether you understand how JavaScript organises behaviour and state. The exam moves quickly from function declarations to object literals to ES6 classes, then tests whether you can read a block of code and predict what happens when scope chains intersect or when a method is called on the wrong context. The challenge is not writing functions from scratch; it is recognising which implementation satisfies a business rule and where...
This is the single largest topic by weight, and it measures whether you understand how JavaScript organises behaviour and state. The exam moves quickly from function declarations to object literals to ES6 classes, then tests whether you can read a block of code and predict what happens when scope chains intersect or when a method is called on the wrong context. The challenge is not writing functions from scratch; it is recognising which implementation satisfies a business rule and where a scope error will break execution.
β Function fundamentals and implementation patterns
You need to distinguish function declarations, function expressions, and arrow functions, and know when each is appropriate. Arrow functions do not bind their own this, and the exam tests that by showing a method defined with an arrow inside an object, then asking what this refers to when the method runs. Default parameters, rest parameters, and destructuring in the parameter list all appear in scenario questions where you must identify whether the function handles missing arguments correctly. Another area is return behaviour: a function that omits a return statement returns undefined, and a question might ask what value a variable receives after calling such a function. Closures are tested implicitly through questions about variable scope, where an inner function references a variable from an outer function and you must determine the value at the time of invocation.
β Objects, prototypes, and property access
Object literals are straightforward until the exam asks about computed property names, shorthand syntax, or methods defined inside the literal. You must know how to add, update, and delete properties, and how to check whether a property exists using hasOwnProperty or the in operator. Prototypal inheritance is tested through scenarios where one object inherits from another and you must trace the property lookup chain. A common mistake is assuming that all properties are own properties, when in fact some are inherited. The exam also tests destructuring assignment with objects, where you extract specific keys into variables, and you need to recognise when the destructuring includes default values or renames a property.
β Classes, constructors, and inheritance
ES6 classes are syntactic sugar over prototypes, but the exam expects you to read class syntax fluently. You must know how the constructor initialises instance properties, how methods are added to the prototype, and how static methods differ from instance methods. Inheritance is tested through extends and super, and a typical question shows a child class that calls super in its constructor, then asks what happens if super is omitted or called in the wrong order. Private fields, introduced with the hash prefix, are less common but may appear in a question about encapsulation. Another scenario involves calling a class method without the new keyword and predicting the error that results.
β Modules, scope, and execution flow
JavaScript modules use import and export, and the exam tests whether you can identify named exports, default exports, and namespace imports. A question might show a module file and ask which import statement correctly brings a function into another file. Variable scope questions present nested functions or blocks and ask which scope a variable belongs to, or whether a reference will succeed. Execution flow questions show a series of function calls, some synchronous and some asynchronous, and ask in what order the console logs appear. The trap is assuming that code executes strictly top-to-bottom, when in fact callbacks and promises introduce deferred execution.
How Objects, Functions, and Classes is tested
At twenty-five percent, this topic produces the most items and the longest code snippets. You will see a function implementation followed by a requirement, and you must decide whether the function satisfies it or identify the line that causes a problem. Object questions present a literal or a class instance and ask how to access, modify, or enumerate properties. Class questions show a parent and child class, then ask what happens when a method is overridden or when super is called. Scope questions present nested functions with variables declared at different levels, and you must trace which binding is in effect at a given reference. Execution flow questions show a mix of synchronous and asynchronous calls, and you must order the output. Marks are lost when candidates confuse function expressions with declarations, when they assume arrow functions bind this, when they forget that a missing return gives undefined, or when they misread the scope chain. The exam rewards candidates who have debugged enough JavaScript to recognise these patterns instantly, because the time pressure does not allow for step-by-step reasoning on every item.
The practice test gives you timed conditions, which matter here because reading nested functions and tracing scope under pressure is harder than doing it in a textbook. The PDF question bank covers every pattern of function, object, and class question, so you can drill the area where you lose marks rather than re-reading the entire topic.
The question below presents a function implementation and a business requirement. Decide whether the function meets the requirement or identify the issue.
Given a value, which three options can a developer use to detect if the value is NaN?
After two topics on language fundamentals, the exam shifts to the runtime environment. You need to show that you can respond to user interactions, query and modify the DOM, and use browser APIs to solve a business requirement. The weight is lower than the first two topics, but the questions are more applied: you are given a scenario and asked which event handler to attach, or which DOM method retrieves the correct element. The cost is in the detail of...
After two topics on language fundamentals, the exam shifts to the runtime environment. You need to show that you can respond to user interactions, query and modify the DOM, and use browser APIs to solve a business requirement. The weight is lower than the first two topics, but the questions are more applied: you are given a scenario and asked which event handler to attach, or which DOM method retrieves the correct element. The cost is in the detail of event propagation and the variety of DOM methods that look similar but behave differently.
β Events, handlers, and propagation
You must know how to attach an event listener with addEventListener, how to remove it, and what happens if you attach the same listener twice. The exam tests event propagation by showing a nested DOM structure and asking whether a click on the inner element triggers handlers on the outer elements. Bubbling is the default, and you need to recognise when stopPropagation prevents further bubbling or when preventDefault stops the browser's default action. Another scenario involves event delegation, where a single listener on a parent element handles events from multiple children, and you must identify the target using event.target. A common mistake is confusing event.target with event.currentTarget, or assuming that all events bubble when in fact focus and blur do not.
β DOM manipulation and traversal
The exam expects you to query the DOM with getElementById, querySelector, and querySelectorAll, and to know which returns a single element and which returns a NodeList. You must also modify the DOM by creating elements with createElement, setting attributes, and appending children with appendChild or append. A typical question shows a requirement to insert a new list item, and you must choose the correct sequence of method calls. Traversal questions ask how to find a sibling, parent, or child element, and you need to know properties like parentNode, nextSibling, and children. Another area is reading and writing element content with textContent, innerHTML, and innerText, and understanding when each is appropriate and when one introduces a security risk.
β Developer tools and browser APIs
Browser developer tools are tested through scenarios where code behaves unexpectedly and you must identify which panel or feature helps diagnose the problem. You might be asked how to set a breakpoint, inspect a variable at runtime, or view the call stack. Browser-specific APIs include localStorage and sessionStorage for persisting data, fetch for making HTTP requests, and the Console API for logging. A question might show a fetch call and ask how to extract JSON from the response, or show a localStorage.setItem call and ask what happens when the storage quota is exceeded. The exam assumes you have used these APIs in a real project and can recognise correct usage without detailed documentation.
How Browser and Events is tested
At seventeen percent, this topic generates fewer items than the first two but demands more context. You will see a DOM structure rendered as HTML, then a requirement to respond to a user action or modify an element. Event questions present a nested structure and ask which elements receive an event, or show an event handler and ask whether it prevents the default action. DOM questions show a requirement to find or change an element, and you must choose the correct method or property. Developer tools questions describe a symptom and ask which tool or panel you would use to investigate. Browser API questions show a code snippet using fetch or localStorage and ask what happens in a specific scenario, such as a network failure or a full storage quota. Marks are lost when candidates confuse bubbling with capturing, when they use innerHTML where textContent is safer, when they forget that querySelectorAll returns a static NodeList rather than a live collection, or when they assume that fetch automatically parses JSON. The exam rewards candidates who have debugged front-end code in the browser and know these behaviours from experience.
Seeing the full range of event propagation and DOM manipulation questions before the exam helps you spot the common traps, like confusing target with currentTarget or assuming that all query methods return the same type. The practice test shows you how much time a nested DOM scenario takes to read, so you can pace yourself on exam day.
The question below involves event propagation in a nested DOM structure. Trace the event flow and decide which handlers execute.
This is the lightest topic by weight, but it tests a skill that separates candidates who have debugged production code from those who have only read tutorials. You need to show that you can catch and handle errors without crashing the application, and that you can use console methods and breakpoints to investigate unexpected behaviour. The exam does not ask you to write a debugger; it asks you to recognise when an error will be thrown, how to catch it,...
This is the lightest topic by weight, but it tests a skill that separates candidates who have debugged production code from those who have only read tutorials. You need to show that you can catch and handle errors without crashing the application, and that you can use console methods and breakpoints to investigate unexpected behaviour. The exam does not ask you to write a debugger; it asks you to recognise when an error will be thrown, how to catch it, and which debugging tool reveals the problem.
How Debugging and Error Handling is tested
At seven percent, this topic produces the fewest items, but each one requires you to read code and predict failure modes. You will see a block of code that throws an error, and you must identify where to place a try-catch block and what the catch block should do with the error. Another scenario shows a function that returns undefined when it should return a value, and you must decide which console method or breakpoint reveals the problem. The exam tests whether you know the difference between console.log, console.warn, and console.error, and when to use each. Breakpoint questions describe a symptom, such as a variable holding an unexpected value, and ask where to set a breakpoint to inspect it at the right moment. A common mistake is placing a try-catch block too narrowly, so that errors outside the block still crash the application, or logging an error without re-throwing it when the calling code needs to know that the operation failed. Marks are also lost when candidates assume that all errors are caught automatically, or when they use console.log in production code where a proper error handler is required. The exam rewards candidates who have used the browser's debugger to step through code and inspect the call stack, because the questions assume that level of familiarity.
The question bank includes every style of error-handling scenario, so you can practice recognising where a try-catch belongs and which console method suits each situation. Working through these items under timed conditions in the practice test shows you how quickly you need to read a stack trace and identify the failing line.
The question below shows code that may throw an error. Decide where to handle it and what the handler should do.
Asynchronous programming is where many candidates lose marks, because the mental model differs from synchronous execution and the exam tests that model directly. You need to show that you understand how callbacks, promises, and async/await work, and that you can predict the order of execution when the event loop schedules tasks. The weight is moderate, but the questions are dense: a single item might show a mix of synchronous code, promise chains, and setTimeout calls, then ask which console log...
Asynchronous programming is where many candidates lose marks, because the mental model differs from synchronous execution and the exam tests that model directly. You need to show that you understand how callbacks, promises, and async/await work, and that you can predict the order of execution when the event loop schedules tasks. The weight is moderate, but the questions are dense: a single item might show a mix of synchronous code, promise chains, and setTimeout calls, then ask which console log appears first.
β Callbacks, promises, and async/await
Callbacks are the oldest pattern, and the exam tests whether you can pass a function as an argument and invoke it at the right time. Promises improve readability, and you must know how to chain then and catch, how to handle rejection, and what Promise.all and Promise.race do. Async/await is syntactic sugar over promises, and the exam expects you to read an async function and predict when it pauses and resumes. A common mistake is forgetting to await a promise, so the function continues before the asynchronous operation completes. Another trap is assuming that an async function returns the resolved value directly, when in fact it always returns a promise. The exam also tests error handling in async functions: you must know that an uncaught error in an async function returns a rejected promise, and that you can catch it with try-catch inside the function or with catch on the returned promise.
β Event loop, task queue, and execution order
The event loop is the mechanism that schedules asynchronous tasks, and the exam tests it by showing a mix of synchronous code, microtasks, and macrotasks, then asking in what order they execute. Microtasks include promise callbacks, and they run before the next macrotask. Macrotasks include setTimeout and setInterval. A typical question shows several console.log statements, some inside a promise then, some inside a setTimeout, and some at the top level, and you must order the output. The trap is assuming that setTimeout with a delay of zero runs immediately, when in fact it queues a macrotask that runs after the current script and all microtasks. Another area is setInterval, where you must predict how many times a callback runs in a given period, or recognise that a long-running callback can cause intervals to overlap.
How Asynchronous Programming is tested
At thirteen percent, this topic generates enough items to punish candidates who rely on intuition rather than understanding the event loop. You will see code that mixes synchronous statements, promises, and timers, and you must predict the order of execution. Another question shows an async function with several await expressions and asks what value the function returns or when a particular line runs. Error-handling questions show a promise chain with a catch block, and you must identify whether the catch handles a rejection or whether the error propagates. Event loop questions present a sequence of console.log calls in different contexts and ask which log appears first. Marks are lost when candidates forget that async functions return promises, when they omit await and assume the code waits anyway, when they confuse microtasks with macrotasks, or when they assume that setTimeout zero runs before promise callbacks. The exam rewards candidates who have debugged asynchronous code in production and can trace execution order without running the code, because the time pressure does not allow for experimentation.
Asynchronous execution is hard to visualise, and the practice test lets you work through event loop questions until the pattern becomes automatic. The PDF bank groups all the promise and async/await items together, so you can drill this area intensively if it is your weak spot.
The question below mixes synchronous code, promises, and timers. Trace the execution order and decide which statement runs first.
The exam now moves to Node.js, and the questions test whether you can choose the right Node.js tool or module for a server-side requirement. You are not expected to write a full application, but you must recognise when a core module like fs or http is appropriate, which CLI command installs a package or runs a script, and which package manager suits a given scenario. The weight is low, but the topic is broad, and candidates who have never used...
The exam now moves to Node.js, and the questions test whether you can choose the right Node.js tool or module for a server-side requirement. You are not expected to write a full application, but you must recognise when a core module like fs or http is appropriate, which CLI command installs a package or runs a script, and which package manager suits a given scenario. The weight is low, but the topic is broad, and candidates who have never used Node.js in a project often struggle to distinguish one module from another.
β Node.js runtime, modules, and frameworks
You need to know what Node.js is and when it is a good fit for a business requirement, such as building a REST API or running a build tool. The exam tests core modules by presenting a requirement and asking which module satisfies it. Common modules include fs for file system operations, http and https for creating servers, path for working with file paths, and events for implementing the observer pattern. You must also recognise when a third-party library or framework is more appropriate than a core module, such as using Express for routing or Lodash for utility functions. A typical question describes a requirement to read a file asynchronously, and you must choose between fs.readFile and fs.readFileSync, knowing that the latter blocks execution.
β CLI commands and package management
The Node.js CLI is tested through scenarios where you must install a package, run a script, or initialise a project. You need to know the difference between npm install, npm install --save-dev, and npm install --global, and when each is appropriate. Another area is the package.json file, where you must recognise how dependencies and devDependencies are listed, and how scripts are defined and invoked. The exam also tests package managers by comparing npm, yarn, and pnpm, and asking which one suits a requirement such as faster installs or stricter dependency resolution. A common mistake is assuming that all package managers use the same commands, when in fact yarn uses add instead of install, and pnpm has its own conventions.
How Server Side JavaScript is tested
At eight percent, this topic produces a small number of items, but they assume you have used Node.js in a real project. You will see a business requirement, such as serving static files or parsing a CSV, and you must choose the correct core module or third-party library. CLI questions describe a task, such as installing a package as a development dependency, and you must select the correct command. Package management questions compare npm, yarn, and pnpm, and ask which one satisfies a specific need or constraint. Marks are lost when candidates confuse synchronous and asynchronous file operations, when they choose a third-party library where a core module is sufficient, when they misremember a CLI flag, or when they assume that all package managers behave identically. The exam rewards candidates who have initialised Node.js projects, installed dependencies, and used core modules in server-side code, because the questions test recognition of correct usage rather than recall of syntax.
The question bank covers every core module and CLI command that appears on the exam, so you can check your coverage without reading Node.js documentation from scratch. The practice test lets you see how these questions are phrased, which helps if you are more familiar with client-side JavaScript than server-side.
The question below describes a server-side requirement. Choose the Node.js module or tool that best satisfies it.
The final topic tests whether you can read a unit test and identify where it fails to cover the code under test. You are not writing tests from scratch; you are reviewing an existing test and deciding what it misses or how to make it more effective. The weight is low, but the skill is critical in professional JavaScript development, and the exam assumes you have written or maintained unit tests in a real codebase. The challenge is recognising an...
The final topic tests whether you can read a unit test and identify where it fails to cover the code under test. You are not writing tests from scratch; you are reviewing an existing test and deciding what it misses or how to make it more effective. The weight is low, but the skill is critical in professional JavaScript development, and the exam assumes you have written or maintained unit tests in a real codebase. The challenge is recognising an ineffective assertion or a missing test case without being told what the code is supposed to do.
How Testing is tested
At seven percent, this topic produces the fewest items, and each one shows a block of code with an accompanying unit test. You must identify where the test is ineffective, such as failing to cover an edge case, asserting the wrong value, or omitting a test for error handling. A typical question shows a function with multiple branches, then a test that covers only the happy path, and you must decide which branch is untested. Another scenario shows a test that asserts a truthy value when it should assert a specific value, and you must recognise that the test would pass even if the function returned the wrong result. The exam also tests whether you know the difference between unit tests and integration tests, and when mocking is appropriate. Marks are lost when candidates assume that a passing test is a good test, when they fail to notice that an assertion is too weak, or when they do not recognise that a test omits error cases. The exam rewards candidates who have reviewed pull requests and debugged failing tests, because the questions require the same critical eye.
The practice test shows you how the exam presents code and tests together, which is a denser format than most candidates expect. The PDF question bank lets you review every testing scenario at your own pace, so you can learn to spot weak assertions and missing coverage before the timer starts.
The question below shows a function and its unit test. Identify the weakness in the test and decide how to improve it.
Ready to Start Practicing?
Access all questions and start your exam preparation journey
Upgrade to Full JS-Dev-101 Exam Questions π