2023 Valid JavaScript-Developer-I test answers & Salesforce Exam PDF
Free Salesforce JavaScript-Developer-I Exam Questions and Answer from Training Expert PrepPDF
How to book the Salesforce JavaScript-Developer-I Exam
There are the following steps for registering the Salesforce JavaScript Developer I exam. Step 1: Visit Salesforce Exam Registration Step 2: Signup/Login to Salesforce account Step 4: Select Date, time and confirm with the payment method
Salesforce JavaScript-Developer-I certification is a valuable credential for developers who want to demonstrate their expertise in building custom solutions on the Salesforce platform using JavaScript. With proper preparation and study, candidates can successfully earn this certification and advance their careers in the Salesforce ecosystem.
NEW QUESTION # 45
Which statement parses successfully?
- A. JSON.parse ('' 'foo' '');
- B. JSON.parse ('foo ');
- C. JSON.parse (''foo '');
- D. JSON.parse ('' 'foo'' ');
Answer: C
NEW QUESTION # 46
A developer is leading the creation of a new web server for their team that will fulfill API requests from an existing client.
The team wants a web server that runs on Node.Js, and they want to use the new web framework Minimalist.Js. The lead developer wants to advocate for a more seasoned back-end framework that already has a community around it.
Which two frameworks could the lead developer advocate for?
Choose 2 answers
- A. Angular
- B. Koa
- C. Express
- D. Gatsby
Answer: A,D
NEW QUESTION # 47
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.aplice (2, 3);
- C. Let x = arr. Slince (2, 3);
- D. Let x = arr.alice (2) ;
- E. Let x = arr.filter( (a) => )return a > 2 )) ;
Answer: B,D,E
NEW QUESTION # 48
developer wants to use a module named universalContainersLib and them call functions from it.
How should a developer import every function from the module and then call the functions foo and bar ?
- A. import * ad lib from '/path/universalContainersLib.js';
lib.foo();
lib.bar(); - B. import (foo, bar) from '/path/universalContainersLib.js';
foo();
bar(); - C. import * from '/path/universalContaineraLib.js';
universalContainersLib.foo();
universalContainersLib.bar(); - D. import all from '/path/universalContaineraLib.js';
universalContainersLib.foo();
universalContainersLib.bar();
Answer: A
NEW QUESTION # 49
A developer has the following array of student test grades:
Let arr = [ 7, 8, 5, 8, 9 ];
The Teacher wants to double each score and then see an array of the students who scored more than 15 points.
How should the developer implement the request?
- A. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));
- B. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
- C. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
- D. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
Answer: D
NEW QUESTION # 50
Which function should a developer use to repeatedly execute code at a fixed interval ?
- A. setTimeout
- B. setIntervel
- C. setInteria
- D. setPeriod
Answer: B
NEW QUESTION # 51
The developer has a function that prints "Hello" to an input name. To test this, thedeveloper created a function that returns "World". However the following snippet does not print " Hello World".
What can the developer do to change the code to print "Hello World" ?
- A. Change line 2 to console.log('Hello' , name() );
- B. Change line 7 to ) () ;
- C. Change line 5 to function world ( ) {
- D. Change line 9 to sayHello(world) ();
Answer: A
NEW QUESTION # 52
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:
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 browser to execute a script that removes all the element containing the class ad-library-item.
- B. Use the DOM inspector to remove all the elements containing the class ad-library-item.
- C. Use the DOM inspector to prevent the load event to be fired.
- D. Use the browser console to execute a script that prevents the load event to be fired.
Answer: B
NEW QUESTION # 53
Refer to the code below:
What is displayed when myfunction(true) is called?
- A. 2 2 undefined undefined
- B. 2 2 1 2
- C. 2 2 1 1
- D. 2 2 2 2
Answer: C
NEW QUESTION # 54
Refer to the following code block:
What is the console output?
- A. > Better student Jackie got 70% on test.
- B. > Jackie got 70% on test.
- C. > Better student Jackie got 100% on test.
- D. > Uncaught Reference Error
Answer: A
NEW QUESTION # 55
Given the JavaScript below:
Which code should replace the placeholder comment on line 06 to hide accounts that do not match the search string?
- A. 'Hidden, visible
- B. 'None' : 'block'
- C. 'Visible : 'hidden'
- D. 'Block' : 'none'
Answer: D
NEW QUESTION # 56
A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript.
The website includes multiple external resources that are loaded when the page is opened.
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is loaded and there is no need to wait for the resources to be available.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?
- A. windows,addEventListener('onload', personalizeWebsiteContent);
- B. windows,addEventListener('load', personalizeWebsiteContent);
- C. windows,addEventListener('DOMContent Loaded ', personalizeWebsiteContent);
- D. windows,addEventListener('onDOMCContentLoaded', personalizeWebsiteContent);
Answer: B
NEW QUESTION # 57
A class was written to represent items for purchase in an online store, and a second class
Representing items that are on sale at a discounted price. THe constructor sets the name to the
first value passed in. The pseudocode is below:
Class Item {
constructor(name, price) {
... // Constructor Implementation
}
}
Class SaleItem extends Item {
constructor (name, price, discount) {
...//Constructor Implementation
}
}
There is a new requirement for a developer to implement a description method that will return a
brief description for Item and SaleItem.
Let regItem =new Item('Scarf', 55);
Let saleItem = new SaleItem('Shirt' 80, -1);
Item.prototype.description = function () { return 'This is a ' + this.name;
console.log(regItem.description());
console.log(saleItem.description());
SaleItem.prototype.description = function () { return 'This is a discounted ' +
this.name; }
console.log(regItem.description());
console.log(saleItem.description());
What is the output when executing the code above ?
- A. This is a Scarf
This is a Shirt
This is a discounted Scarf
This is a discounted Shirt - B. This is a Scarf
This is a Shirt
This is a Scarf
This is a discounted Shirt - C. This is aScarf
Uncaught TypeError: saleItem.description is not a function
This is a Shirt
This is a did counted Shirt - D. This is a Scarf
Uncaught TypeError: saleItem.description is not a function
This is aScarf
This is a discounted Shirt
Answer: B
NEW QUESTION # 58
A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code.
Which option allows the developer to step into each function execution within calculateBill?
- A. Using the debugger command on line 03.
- B. Calling the console. Trace( total ) method on line 03.
- C. Wrapping findsubtotal in a console .log method.
- D. Using the debugger command on line 05.
Answer: A
NEW QUESTION # 59
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. 0
- B. 1
- C. Nan
- D. Undefined
Answer: B
NEW QUESTION # 60
A developer is asked to fix some bugs reported by users. To do that, the developer adds a breakpoint for debugging.
Function Car (maxSpeed, color){
This.maxspeed =masSpeed;
This.color = color;
Let carSpeed = document.getElementById(' CarSpeed');
Debugger;
Let fourWheels =new Car (carSpeed.value, 'red');
When the code execution stops at the breakpoint on line 06, which two types of information are available in the browser console ?
Choose 2 answers:
- A. The values of the carSpeed and fourWheels variables
- B. A variable displaying the number of instances created for the Car Object.
- C. The style, event listeners and other attributes applied to the carSpeed DOM element
- D. The information stored in the window.localStorage property
Answer: C,D
NEW QUESTION # 61
Given the following code:
What will be the first four numbers logged?
- A. 0123
- B. 0122
- C. 0112
- D. 0012
Answer: B
NEW QUESTION # 62
Refer to the code snippet:
Function getAvailabilityMessage(item) {
If (getAvailability(item)){
Var msg ="Username available";
}
Return msg;
}
A developer writes this code to return a message to user attempting 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. "newUserName"
- B. "Msg is not defined"
- C. "Username available"
- D. undefined
Answer: D
NEW QUESTION # 63
......
Salesforce JavaScript-Developer-I exam is one of the most sought-after certifications in the Salesforce ecosystem. As a Salesforce Certified JavaScript Developer I, a professional can demonstrate their expertise in building custom applications on the Salesforce platform using JavaScript. Salesforce Certified JavaScript Developer I Exam certification is designed for developers who possess a deep understanding of JavaScript and its related technologies.
Top Salesforce JavaScript-Developer-I Courses Online: https://www.preppdf.com/Salesforce/JavaScript-Developer-I-prepaway-exam-dumps.html
JavaScript-Developer-I Practice Dumps - Verified By PrepPDF Updated 225 Questions: https://drive.google.com/open?id=1AlQ4On3HVTtQ5YX3c0UjU5XAwd0AVhWF