Salesforce Certified JavaScript Developer I Practice Test - Questions Answers, Page 14
List of questions
Related questions
Refer to the code below:
Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve (
setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500);
Const bPromise = await resolveAfterMilliseconds(500);
Await aPromise, wait bPromise;
What is the result of running line 05?
Refer to the code below:
Const searchTest = 'Yay! Salesforce is amazing!" ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?
Why would a developer specify a package.jason as a developed forge instead of a dependency ?
Refer to the code below:
let o = {
get js() {
let city1 = String("st. Louis");
let city2 = String(" New York");
return {
firstCity: city1.toLowerCase(),
secondCity: city2.toLowerCase(),
What value can a developer expect when referencing o.js.secondCity?
Given the code below:
Setcurrent URL ();
console.log('The current URL is: ' +url );
function setCurrentUrl() {
Url = window.location.href:
What happens when the code executes?
What happens when the code executes?
A developer has two ways to write a function:
Option A:
function Monster() {
This.growl = () => {
Console.log ("Grr!");
}}
Option B:
function Monster() {};
Monster.prototype.growl =() => {
console.log("Grr!");
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A Option B?
Which three browser specific APIs are available for developers to persist data between page loads ?
Choose 3 answers
Refer to the code below:
Const myFunction = arr => {
Return arr.reduce((result, current) =>{
Return result = current;
}, 10};
}
What is the output of this function when called with an empty array ?
In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default.
Which two methods are used to address this ?
Choose 2 answers
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.
Question