# Salesforce JavaScript Developer I (SJDI) practice exams

> Salesforce JavaScript Developer I practice exams: 290 questions in 5 timed tests covering Objects. Every answer explained, with a score for each domain.

Page: https://devopscodelab.com/exams/salesforce-javascript-developer-i/

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

| Setting | Value |
| --- | --- |
| 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 format before you book.

## Domains and weights

| Domain | Weight | 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 |

## Price and access

- SJDI practice exams: $12.99 for 12 months of access.
- Free mini exam: 15 questions with explanations (free account): https://devopscodelab.com/app/exams/salesforce-javascript-developer-i/mini/
- All-Access subscription includes every exam: https://devopscodelab.com/pricing/
- 10 free questions with answers: https://devopscodelab.com/exams/salesforce-javascript-developer-i/free-practice-questions/

## 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?

- A. Store the metadata in a WeakMap keyed by the element object
- B. Store the metadata in a Map keyed by the element object
- C. Store the metadata in a Set of { element, data } wrapper objects
- D. Store the metadata on a global object keyed by each element's id

**Answer:** A

**Explanation:** 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?

- A. A WeakSet, adding Ids with add() so unused entries are garbage collected
- B. A Set, adding Ids with add() and checking membership with has()
- C. A plain object keyed by Id, iterating with for...in to read the selections
- D. An Array, checking each new Id with indexOf() before calling push()

**Answer:** B

**Explanation:** 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?

- A. Hi, undefined! Hey, undefined?
- B. Hi, Rae! Hey,?, Raeundefined
- C. Hi, Rae! Hey, Rae?
- D. Hi, Rae! followed by a thrown TypeError

**Answer:** C

**Explanation:** 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.


## 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.

DevOpsCode Lab is not affiliated with Salesforce. SJDI and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
