JavaScript-Developer-I Exam Questions - Online Test


JavaScript-Developer-I Premium VCE File

Learn More 100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours

certleader.com

It is more faster and easier to pass the Salesforce JavaScript-Developer-I exam by using Breathing Salesforce Salesforce Certified JavaScript Developer I questuins and answers. Immediate access to the Rebirth JavaScript-Developer-I Exam and find the same core area JavaScript-Developer-I questions with professionally verified answers, then PASS your exam with a high score now.

Salesforce JavaScript-Developer-I Free Dumps Questions Online, Read and Test Now.

NEW QUESTION 1
A developer has a formatName function that takes two arguments, firstName and lastName and returns a string. They want to schedule the
function to run once after five seconds.
What is the correct syntax to schedule this function?

  • A. setTimeout (formatName(), 5000, "John", "BDoe");
  • B. setTimeout (formatName('John', ‘'Doe'), 5000);
  • C. setTimout(() => { formatName("John', 'Doe') }, 5000);
  • D. setTimeout ('formatName', 5000, 'John", "Doe');

Answer: D

NEW QUESTION 2
Refer to following code: class Vehicle { constructor(plate) { This.plate =plate;
}
}
Class Truck extends Vehicle { constructor(plate, weight) {
//Missing code This.weight = weight;
}
displayWeight() {
console.log(‘Thetruck ${this.plate} has a weight of ${this.weight} lb.’);}} Let myTruck = new Truck(‘123AB’, 5000);
myTruck.displayWeight();
Which statement should be added to line 09 for the code to display ‘The truck 123AB has a weight of 5000lb.’?

  • A. Super.plate =plate;
  • B. super(plate);
  • C. This.plate =plate;
  • D. Vehicle.plate = plate;

Answer: B

NEW QUESTION 3
At Universal Containers, every team has its own way of copyingJavaScript objects. The code
Snippet shows an implementation from one team:
JavaScript-Developer-I dumps exhibit
What is the Output of the code execution?

  • A. Hello Dan Doe
  • B. Hello John DOe
  • C. TypeError: dan.name is not a function
  • D. TypeError: Assignment to constant variable.

Answer: C

NEW QUESTION 4
Refer to the following array: Let arr = [ 1,2, 3, 4, 5];
Which three options result in x evaluating as [3, 4, 5] ? Choose 3 answers.

  • A. Let x= arr.filter (( a) => (a<2));
  • B. Let x=arr.splice(2,3);
  • C. Let x= arr.slice(2);
  • D. Let x= arr.filter((a) => ( return a>2 ));
  • E. Let x = arr.slice(2,3);

Answer: BCD

NEW QUESTION 5
What is the result of the code block?
JavaScript-Developer-I dumps exhibit

  • A. The console logs only ‘flag’.
  • B. The console logs ‘flag’ and another flag.
  • C. An error is thrown.
  • D. The console logs ‘flag’ and then an error isthrown.

Answer: D

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

  • A. The line 05 assertion passes.
  • B. The line 02 assertion passes.
  • C. The line 02 assertion fails.
  • D. The line 05 assertion fails.

Answer: BD

NEW QUESTION 7
Which three actions can be using the JavaScript browser console? Choose 3 answers:

  • A. View and change DOM the page.
  • B. Display a report showing the performance of a page.
  • C. Run code that is not related to page.
  • D. view , change, and debug the JavaScript code of the page.
  • E. View and change security cookies.

Answer: ACD

NEW QUESTION 8
Universal Containers recently launched its new landing page to host a crowd-funding
campaign. The page uses an external library to display some third-party ads. Once the page is fully loaded, it creates more than 50 new HTML items placed randomly inside the DOM, like the one in the code below:
JavaScript-Developer-I dumps exhibit
All the elements includes the same ad-library-item class, They are hidden by default, and they are randomly displayed while the user navigates through the page.

  • A. Use the DOM inspector to prevent the load event to be fired.
  • B. Use the browser to execute a script that removes all the element containing the class ad-library-item.
  • C. Use the DOM inspector to remove all the elements containing the class ad-library-item.
  • D. Use the browser console to execute a script that prevents the load event to be fired.

Answer: B

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

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

Answer: B

NEW QUESTION 10
Refer to the code below:
JavaScript-Developer-I dumps exhibit
Why does the function bar have access to variable a ?

  • A. Inner function’s scope
  • B. Hoisting
  • C. Outer function’s scope
  • D. Prototype chain

Answer: C

NEW QUESTION 11
Refer to the code snippet:
JavaScript-Developer-I dumps exhibit
A developer writes this code to return a message to userattempting to register a new username. If the username is available, variable.
What is the return value of msg hen getAvailabilityMessage (“newUserName” ) is executed and getAvailability(“newUserName”) returns false?

  • A. “Username available”
  • B. “newUserName”
  • C. “Msg is not defined”
  • D. undefined

Answer: D

NEW QUESTION 12
Refer to the code below:
JavaScript-Developer-I dumps exhibit
What is the output of this function when called with an empty array?

  • A. Returns 0
  • B. Throws an error
  • C. Returns 10
  • D. Returns NaN

Answer: C

NEW QUESTION 13
Which statement accurately describes an aspect of promises?

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

Answer: A

NEW QUESTION 14
Refer to the code below: FunctionPerson(firstName, lastName, eyecolor) { this.firstName =firstName;
this.lastName = lastName;
this.eyeColor = eyeColor;
}
Person.job = ‘Developer’;
const myFather = new Person(‘John’, ‘Doe’); console.log(myFather.job);
What is the output after the codeexecutes?

  • A. ReferenceError: eyeColor is not defined
  • B. ReferenceError: assignment to undeclared variable “Person”
  • C. Developer
  • D. Undefined

Answer: D

NEW QUESTION 15
Refer to the code below: Function changeValue(obj) { Obj.value =obj.value/2;
}
Const objA = (value: 10);
Const objB = objA; changeValue(objB); Const result = objA.value;
What is the value of result after the code executes?

  • A. 10
  • B. Nan
  • C. 5
  • D. Undefined

Answer: C

NEW QUESTION 16
Refer to 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?"));
JavaScript-Developer-I dumps exhibit
When does Promise.finally on line 08 get called?

  • A. When rejected
  • B. When resolved and settled
  • C. WHen resolved
  • D. When resolved or rejected

Answer: D

NEW QUESTION 17
A developer is creating a simple webpage with a button. When a userclicks this button for the first time, a message is displayed.
The developer wrote the JavaScript code below, but something is missing. The message gets displayed every time a user clicks the button, instead of just the first time.
JavaScript-Developer-I dumps exhibit
Which two code lines make this code work as required? Choose 2 answers

  • A. On line 02, use event.first to test if it is the first execution.
  • B. On line 04, useevent.stopPropagation ( ),
  • C. On line 04, use button.removeEventListener(‘ click” , listen);
  • D. On line 06, add an option called once to button.addEventListener().

Answer: CD

NEW QUESTION 18
......

https://www.dumps-hub.com/JavaScript-Developer-I-dumps.html (New 157 Q&As Version)