Free JavaScript-Developer-I Exam Braindumps

Pass your Salesforce Certified JavaScript Developer I exam with these free Questions and Answers

Page 2 of 44
QUESTION 1

Given the following code:
document.body.addEventListener(‘ click ’, (event) => { if (/* CODE REPLACEMENT HERE */) {
console.log(‘button clicked!’);
)
});
Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?

  1. A. Event.clicked
  2. B. e.nodeTarget ==this
  3. C. event.target.nodeName == ‘BUTTON’
  4. D. button.addEventListener(‘click’)

Correct Answer: C

QUESTION 2

A Developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three number in the array, The test passes:
JavaScript-Developer-I dumps exhibit
A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array. The test passes:
Which two results occur when running the test on the updated sum3 function ? Choose 2 answers

  1. A. The line 02 assertion passes.
  2. B. The line 02 assertion fails
  3. C. The line 05 assertion passes.
  4. D. The line 05 assertion fails.

Correct Answer: AD

QUESTION 3

Which statement accurately describes an aspect of promises?

  1. A. Arguments for the callback function passed to .then() are optional.
  2. B. In a.then() function, returning results is not necessary since callbacks will catch the result of a previous promise.
  3. C. .then() cannot be added after a catch.
  4. D. .then() manipulates and returns the original promise.

Correct Answer: A

QUESTION 4

Refer to the code snippet below: Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i < array xss=removed>array.splice(i, 1);
}
}
JavaScript-Developer-I dumps exhibit
What is the value of array after the code executes?

  1. A. [1, 2, 3, 4, 5, 4, 4]
  2. B. [1, 2, 3, 4, 4, 5, 4]
  3. C. [1, 2, 3, 5]
  4. D. [1, 2, 3, 4, 5, 4]

Correct Answer: B

QUESTION 5

A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below:
Import printPrice from‘/path/PricePrettyPrint.js’;
Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work ?

  1. A. printPrice must be be a named export
  2. B. printPrice must be an all export
  3. C. printPrice must be the default export
  4. D. printPrice must be a multi exportc

Correct Answer: C

Page 2 of 44

Post your Comments and Discuss Salesforce JavaScript-Developer-I exam with other Community members: