Free Certified JavaScript Developer I Exam Braindumps
Salesforce Certified JavaScript Developer I Questions 71–75 (page: 16)

Updated On: 10-Feb-2026

Refer to the code below:
Let str = `javascript';
Str[0] = `J';
Str[4] = 'S';
After changing the string indexvalues, the value of str is `javascript'.
What is the reason for this value:

  1. Non-primitive values are mutable.
  2. Non-primitive values are immutable.
  3. Primitive values are mutable.
  4. Primitive values are immutable.

Answer(s): D



Referto the code below:
new Promise((resolve, reject) => {
const fraction = Math.random();
if( fraction >0.5) reject("fraction > 0.5, " + fraction); resolve(fraction);
})
.then(() =>console.log("resolved"))
.catch((error) => console.error(error))
.finally(() =>console.log(" when am I called?"));



When does Promise.finally on line 08 get called?

  1. When rejected
  2. When resolved and settled
  3. When resolved
  4. When resolved or rejected

Answer(s): D



Refer to the following array:
Let arr1 = [ 1,2, 3, 4, 5 ];



Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?

  1. Let arr2 = arr1.slice(0, 5);
  2. Let arr2 = Array.from(arr1);
  3. Let arr2 = arr1;
  4. Let arr2 = arr1.sort();

Answer(s): A,B



Refer to code below:
Function muFunction(reassign){
Let x = 1;
var y = 1;
if( reassign ) {
Let x= 2;
Var y = 2;
console.log(x);

console.log(y);}
console.log(x);
console.log(y);}

What is displayed when myFunction(true) is called?

  1. 2 2 1 1
  2. 2 2 undefined undefined
  3. 2 2 1 2
  4. 2 2 2 2

Answer(s): C



A developer wants to create an object from a function in the browser using the code below:
Function Monster() { this.name = `hello' };
Const z = Monster();
What happens due to lackof the new keyword on line 02?

  1. The z variable is assigned the correct object.
  2. The z variable is assigned the correct object but this.name remains undefined.
  3. Window.name is assigned to `hello' and the variable z remains undefined.
  4. Window.m is assigned the correct object.

Answer(s): C



Viewing page 16 of 46
Viewing questions 76 - 80 out of 224 questions


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

AI Tutor AI Tutor 👋 I’m here to help!