SJDI

Salesforce JavaScript Developer I (SJDI) practice exams

290 questions in 5 timed practice tests. Each test has about 61 questions and a 105-minute limit. The pass mark is 65%. Results are split across the 7 exam domains.

Exam at a glance

SJDI practice exam settings
Practice tests 5
Questions in total 290
Questions per test About 61
Time limit per test 105 minutes
Pass mark 65%
Question types Single answer and multiple answer (28 multiple-answer questions)
Level Associate
Category Business Platforms

These are the settings of our practice tests. Check the official Salesforce exam page for the current exam format before you book.

Domains and weights

SJDI exam domains, weights and question counts
Domain Weight Weight bar Questions in our bank
Variables, Types, and Collections 23% 66
Objects, Functions, and Classes 25% 73
Browser and Events 17% 49
Debugging and Error Handling 7% 21
Asynchronous Programming 13% 38
Server Side JavaScript 8% 23
Testing 7% 20

Sample questions

Question 1 of 3

A developer attaches metadata to DOM elements that are frequently removed from the page. The metadata must not keep removed elements alive in memory, and the code never needs to iterate over all entries. Which approach meets these requirements?

  1. A Store the metadata in a WeakMap keyed by the element object (correct answer)
  2. B Store the metadata in a Map keyed by the element object
  3. C Store the metadata in a Set of { element, data } wrapper objects
  4. D Store the metadata on a global object keyed by each element's id
Why: WeakMap holds its keys weakly, so once an element is removed and no other references exist, both the key and its value can be garbage collected; WeakMaps are not iterable, which matches the requirement. A Map or a Set holds strong references, keeping removed elements in memory until entries are deleted manually. A global object keyed by id strings also retains the data indefinitely and breaks for elements without an id.

Question 2 of 3

A Lightning web component stores a list of selected record Ids and must reject duplicates automatically while preserving insertion order. Lookups such as "is this Id already selected?" must be fast. Which data structure should the developer use?

  1. A A WeakSet, adding Ids with add() so unused entries are garbage collected
  2. B A Set, adding Ids with add() and checking membership with has() (correct answer)
  3. C A plain object keyed by Id, iterating with for...in to read the selections
  4. D An Array, checking each new Id with indexOf() before calling push()
Why: A Set stores unique values, keeps insertion order when iterated, and offers has() for constant-time membership checks. An Array with indexOf() works but checks are linear and duplicates are only prevented manually. A WeakSet accepts only objects, not string Ids, and cannot be iterated. A plain object does not guarantee insertion order for integer-like keys and is less direct than a Set for this purpose.

Question 3 of 3

A developer invokes a function with an explicit this value: function greet(greeting, punctuation) { return ${greeting}, ${this.name}${punctuation}; } const person = { name: 'Rae' }; console.log(greet.call(person, 'Hi', '!'), greet.apply(person, ['Hey', '?'])); What is logged?

  1. A Hi, undefined! Hey, undefined?
  2. B Hi, Rae! Hey,?, Raeundefined
  3. C Hi, Rae! Hey, Rae? (correct answer)
  4. D Hi, Rae! followed by a thrown TypeError
Why: call() takes this followed by individual arguments, and apply() takes this followed by an array of arguments that is spread into the parameters; both set this to person, so name resolves to 'Rae'. undefined for the name would appear only if the function were called without a receiver. Treating the array as a single greeting argument describes call(), not apply(), and apply accepts an array, so no TypeError is thrown.

What your score report looks like

Example attempt, SJDI practice test 3

80%

Passed
Pass mark 65%

Score by exam domain
DomainWeightYour score%
Variables, Types, and Collections 23%
88
Objects, Functions, and Classes 25%
81
Browser and Events 17%
76
Debugging and Error Handling 7%
58
Asynchronous Programming 13%
84
Server Side JavaScript 8%
72

Study next: Debugging and Error Handling. It is below the pass mark and carries 7% of the exam.

Domains and pass mark from our SJDI practice tests. Scores are an example attempt.

Study plans

Two weeks

  1. Day 1: take practice test 1 in exam mode to get a baseline.
  2. Days 2 to 5: domain mode on Objects, Functions, and Classes and Variables, Types, and Collections, the two most heavily weighted domains.
  3. Day 6: practice test 2 in exam mode, then the mistakes quiz.
  4. Days 7 to 12: practice tests 3 to 5, one every other day, each followed by its mistakes quiz.
  5. Days 13 and 14: final mode. Book the exam when your readiness stays above the pass mark.

Four weeks

  1. Week 1: one practice test in practice mode, reading every explanation. Note your two lowest domains.
  2. Week 2: domain mode on those two domains, then a second practice test in exam mode.
  3. Week 3: practice tests 3 and 4 in exam mode, with the mistakes and flagged quizzes after each.
  4. Week 4: practice test 5 and final mode until your readiness holds above the pass mark.

Questions about the SJDI practice exams

Are these real SJDI exam questions?
No. We write every question ourselves and map it to the published SJDI exam objectives. We do not use leaked or recalled questions.
Do the time limit and pass mark match the official exam?
They match the settings of our practice tests. Exam providers change their format from time to time, so check the official exam page before you book.
Can I try it before I pay?
Yes. The free mini exam has 15 questions with full explanations and needs no account.
How long do I keep access?
A single-exam purchase gives you 12 months of access. All-Access includes this exam for as long as your subscription runs.
What happens after I finish a test?
You get a score, a pass or fail against the pass mark, a score per domain and every answer with its explanation.

Last updated November 2026. Written and reviewed by the DevOpsCode Lab team.

DevOpsCode Lab is not affiliated with Salesforce. SJDI and related names are trademarks of their owners.

Related exams
Exam Vendor Level Questions Minutes Price
PDIIPDII Salesforce Platform Developer II Salesforce Professional 300 120 $14.99
SAASalesforce Advanced Administrator Salesforce Professional 300 105 $14.99
SASCSalesforce Agentforce Sales Consultant Salesforce Professional 300 105 $14.99
SASCSalesforce Agentforce Service Consultant Salesforce Professional 300 105 $14.99
SCDCSalesforce Certified Data 360 Consultant Salesforce Professional 300 105 $14.99
SDASalesforce Data Architect Salesforce Professional 300 105 $14.99