Salesforce JAVASCRIPT-DEVELOPER-I Exam (page: 6)
Salesforce Certified JavaScript Developer I
Updated on: 25-Dec-2025

Consider type coercion, what does the following expression evaluate to? True + 3 + `100' + null

  1. 104
  2. 4100
  3. `3100null'
  4. `4100null'

Answer(s): D



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:
Let res = sum2([1, 2, 3 ]) ;

console.assert(res === 6 );
Res = sum3([ 1, 2, 3, 4]);
console.assert(res=== 6);
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. The line 02 assertion passes.
  2. The line 02 assertion fails
  3. The line 05 assertion passes.
  4. The line 05 assertion fails.

Answer(s): A,D



A developer creates a simple webpage with an input field.
When a user enters text in the inputfield and clicks the button, the actual value of the field must be displayed in the console.
Here is the HTML file content:
<input type =" text" value="Hello" name ="input">
<button type ="button" >Display </button>
The developer wrote the javascript codebelow:
Const button = document.querySelector(`button');
button.addEvenListener(`click', () => (
Const input = document.querySelector(`input');
console.log(input.getAttribute(`value'));
When the user clicks the button, the output is always "Hello".
What needs to be done make this code work as expected?

  1. Replace line 04 with console.log(input .value);
  2. Replace line 03 with const input = document.getElementByName(`input');
  3. Replace line 02 with button.addEventListener("onclick", function() {
  4. Replace line 02 with button.addCallback("click", function() {

Answer(s): A



A developer creates an object where its properties should be immutable and prevent properties from being added or modified.
Which method should be used to execute this businessrequirement ?

  1. Object.const()
  2. Object.eval()
  3. Object.lock()
  4. Object.freeze()

Answer(s): D



A developer has an ErrorHandler module that contains multiple functions.
What kind of export be leverages so that multiple functions can beused?

  1. Named
  2. All
  3. Multi
  4. Default

Answer(s): A



Viewing Page 6 of 46



Share your comments for Salesforce JAVASCRIPT-DEVELOPER-I exam with other users:

Gopinadh 8/9/2023 4:05:00 AM

question number 2 is indicating you are giving proper questions. observe and change properly.
Anonymous