20:00

Quiz JS-Dev-101: Salesforce Certified JavaScript Developer

Free Test
/ 10

Quiz

1/10
JSON and Data Transformation - Serialization, parsing, object transformation, and data interchange
An API returns the JSON text `[{"id":"A1","amount":"12.50"}]`. The application must produce a new JavaScript array in which `amount` is a number, while leaving the parsed source objects unchanged. Which implementation meets both requirements?
Select the answer
1 correct answer
A.
const records = JSON.parse(response); records.forEach(record => { record.amount = Number(record.amount); });
B.
const records = response.map(record => ({ ...record, amount: Number(record.amount) }));
C.
const records = JSON.parse(response).map(record => ({ ...record, amount: Number(record.amount) }));
D.
const records = JSON.stringify(response).map(record => ({ ...record, amount: Number(record.amount) }));

Quiz

2/10
Variables and Data Types - Declarations, primitives, references, coercion, and equality
Consider the following JavaScript code:

const first = { status: "ready" };
const second = first;
second.status = "done";

console.log(first.status === "done");

What value is printed?
Select the answer
1 correct answer
A.
true
B.
false
C.
undefined
D.
A TypeError is thrown

Quiz

3/10
DOM and Browser APIs - Document manipulation, events, browser storage, and Web APIs
A list renders its items dynamically after the page loads. A click handler is attached to the list container, and the handler should process clicks on buttons inside each item, including buttons added later. Which implementation best supports this requirement?
Select the answer
1 correct answer
A.
Attach a separate click handler to every item button immediately after each button is created
B.
Attach one click handler to the container and use event.target.closest('button') inside the handler
C.
Attach the handler to the document and prevent propagation from every unrelated element
D.
Attach the handler to the container and read event.currentTarget as the clicked button

Quiz

4/10
Control Flow and Operators - Conditional logic, loops, logical operators, and expressions
Consider the following JavaScript code:

let attempts = 0;
let approved = false;

while (attempts < 3 && !approved) {
attempts++;
if (attempts === 2) {
approved = true;
}
}

What are the final values of attempts and approved?
Select the answer
1 correct answer
A.
attempts is 1 and approved is false
B.
attempts is 2 and approved is true
C.
attempts is 3 and approved is true
D.
attempts is 3 and approved is false

Quiz

5/10
Arrays and Iterables - Array methods, iteration protocols, spread syntax, and destructuring
A developer needs an array containing the unique values from a Set and then separates its first value from the remaining values. What are the values of `first` and `rest` after this code runs?

```javascript
const unique = new Set([2, 4, 2, 6]);
const [first, ...rest] = [...unique];
```
Select the answer
1 correct answer
A.
`first` is `2` and `rest` is `[2, 4, 6]`
B.
`first` is `[2, 4, 6]` and `rest` is `[]`
C.
`first` is `2` and `rest` is `[4, 6]`
D.
`first` is `4` and `rest` is `[2, 6]`

Quiz

6/10
JavaScript Modules - ES modules, imports, exports, and module organization
A module named `utils.js` contains `export const formatDate = ...;` and `export default function buildLabel() { ... }`. Which statement correctly imports both exports into another ES module?
Select the answer
1 correct answer
A.
import { buildLabel, formatDate } from './utils.js';
B.
import buildLabel, { formatDate } from './utils.js';
C.
import { default as formatDate, buildLabel } from './utils.js';
D.
import default buildLabel, formatDate from './utils.js';

Quiz

7/10
Testing and Debugging - Unit testing concepts, assertions, debugging tools, and testable code
A JavaScript module calculates a value by calling a browser API directly inside the function. Unit tests become dependent on the real browser environment and are difficult to isolate. Which refactoring most improves the code's testability?
Select the answer
1 correct answer
A.
Move the browser API call into the test so production code remains unchanged
B.
Pass the browser-dependent operation into the function as a dependency
C.
Replace the unit test with a manual test in the browser
D.
Add more logging statements around the browser API call

Quiz

8/10
Strings and Regular Expressions - String methods, templates, parsing, and pattern matching
A JavaScript component processes an identifier as follows:

const input = " SFDC-042 ";
const value = input.trim();
const match = /^([A-Z]+)-(\d+)$/.exec(value);
const result = `${match[1]}-${Number(match[2])}`;

What is the value of result?
Select the answer
1 correct answer
A.
SFDC-042
B.
SFDC-42
C.
SFDC-undefined
D.
SFDC-NaN

Quiz

9/10
Asynchronous JavaScript - Promises, async/await, event loop, and callbacks
A browser executes the following code:

console.log("A");
setTimeout(() => console.log("B"), 0);
Promise.resolve().then(() => console.log("C"));
console.log("D");

What is the order in which the values are printed?
Select the answer
1 correct answer
A.
A, D, C, B
B.
A, C, D, B
C.
A, B, D, C
D.
A, D, B, C

Quiz

10/10
Functions - Scope, closures, callbacks, higher-order functions, and function context
Consider the following JavaScript code:

let makeCounter = () => {
let count = 0;
return () => ++count;
};

const first = makeCounter();
const second = makeCounter();

first();
first();
second();

What values will the next calls to `first()` and `second()` return?
Select the answer
1 correct answer
A.
The next calls return 3 and 2, respectively.
B.
The next calls return 2 and 2, respectively.
C.
The next calls return 3 and 1, respectively.
D.
The next calls return 1 and 3, respectively.
Looking for more questions?Buy now

JS-Dev-101: Salesforce Certified JavaScript Developer Practice test unlocks all online simulator questions

Thank you for choosing the free version of the JS-Dev-101: Salesforce Certified JavaScript Developer practice test! Further deepen your knowledge on Salesforce Simulator; by unlocking the full version of our JS-Dev-101: Salesforce Certified JavaScript Developer Simulator you will be able to take tests with over 289 constantly updated questions and easily pass your exam. 98% of people pass the exam in the first attempt after preparing with our 289 questions.

BUY NOW

What to expect from our JS-Dev-101: Salesforce Certified JavaScript Developer practice tests and how to prepare for any exam?

The JS-Dev-101: Salesforce Certified JavaScript Developer Simulator Practice Tests are part of the Salesforce Database and are the best way to prepare for any JS-Dev-101: Salesforce Certified JavaScript Developer exam. The JS-Dev-101: Salesforce Certified JavaScript Developer practice tests consist of 289 questions and are written by experts to help you and prepare you to pass the exam on the first attempt. The JS-Dev-101: Salesforce Certified JavaScript Developer database includes questions from previous and other exams, which means you will be able to practice simulating past and future questions. Preparation with JS-Dev-101: Salesforce Certified JavaScript Developer Simulator will also give you an idea of the time it will take to complete each section of the JS-Dev-101: Salesforce Certified JavaScript Developer practice test . It is important to note that the JS-Dev-101: Salesforce Certified JavaScript Developer Simulator does not replace the classic JS-Dev-101: Salesforce Certified JavaScript Developer study guides; however, the Simulator provides valuable insights into what to expect and how much work needs to be done to prepare for the JS-Dev-101: Salesforce Certified JavaScript Developer exam.

BUY NOW

JS-Dev-101: Salesforce Certified JavaScript Developer Practice test therefore represents an excellent tool to prepare for the actual exam together with our Salesforce practice test . Our JS-Dev-101: Salesforce Certified JavaScript Developer Simulator will help you assess your level of preparation and understand your strengths and weaknesses. Below you can read all the quizzes you will find in our JS-Dev-101: Salesforce Certified JavaScript Developer Simulator and how our unique JS-Dev-101: Salesforce Certified JavaScript Developer Database made up of real questions:

Info quiz:

  • Quiz name:JS-Dev-101: Salesforce Certified JavaScript Developer
  • Total number of questions:289
  • Number of questions for the test:50
  • Pass score:80%

You can prepare for the JS-Dev-101: Salesforce Certified JavaScript Developer exams with our mobile app. It is very easy to use and even works offline in case of network failure, with all the functions you need to study and practice with our JS-Dev-101: Salesforce Certified JavaScript Developer Simulator.

Use our Mobile App, available for both Android and iOS devices, with our JS-Dev-101: Salesforce Certified JavaScript Developer Simulator . You can use it anywhere and always remember that our mobile app is free and available on all stores.

Our Mobile App contains all JS-Dev-101: Salesforce Certified JavaScript Developer practice tests which consist of 289 questions and also provide study material to pass the final JS-Dev-101: Salesforce Certified JavaScript Developer exam with guaranteed success. Our JS-Dev-101: Salesforce Certified JavaScript Developer database contain hundreds of questions and Salesforce Tests related to JS-Dev-101: Salesforce Certified JavaScript Developer Exam. This way you can practice anywhere you want, even offline without the internet.

BUY NOW