JavaScript-Developer-I試験無料問題集「Salesforce Certified JavaScript Developer I 認定」

Given the following code:

is the output of line 02?

GIven a value, which three options can a developer use to detect if thevalue is NaN?
Choose 3 answers !

Considering type coercion, what does the following expression evaluate to?
True + '13' + NaN

Given the following code:
Let x =('15' + 10)*2;
What is the value of a?

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 ?

Refer to the code below:

What is the value of result when the code executes?

A developer at Universal Containers is creating their new landing pagebased 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 isloaded 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?

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

Refer to the code below:
Let car1 = new Promise((_ , reject) =>
setTimeout(reject, 2000, "car 1 crashed in" =>
Let car2 =new Promise(resolve => setTimeout(resolve, 1500, "car 2 completed") Let car3 =new Promise(resolve =>setTimeout(resolve, 3000, "car 3 completed") Promise.race(( car1, car2, car3))
.then (value => (
Let result = '$(value) the race.';)}
.catch(arr => {
console.log("Race is cancelled.", err);
});
What is the value of result when Promise.race executes?

A team that works on a big project uses npm to deal with projects dependencies.
A developer added a dependency does not get downloaded when they execute npm install.
Which two reasons could be possible explanations for this?
Choose 2 answers

正解:B,C,D 解答を投票する
Given the code below:
const delay = async delay =>{
return new Promise((resolve,reject)=>{
console.log(1);
setTimeout(resolve,deleay);
});
};
const callDelay =async ()=>{
console.log(2);
const yup = await delay(1000);
console.log(3);
}
console.log(4);
callDelay();
console.log(5);
What is logged to the console?
正解:
4 2 1 5 3
Given the following code:
let x = null;
console.log(typeof x);
What is the output?

Given the code below:
Which three code segments result in a correct conversion from number to string? Choose 3 answers

正解:B,C,D 解答を投票する
developer wants to use a module named universalContainersLib and them callfunctions from it.
How should a developer import every function from the module and then call the functions foo and bar ?

A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript.
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is fully loaded (HTML content and all related files), in order to do some custom initializations.
Which implementation should be used to call Fe:s:-a;::eHec5;te::.-.ter.: based on the business requirement above?

Refer to HTML below:
<p> The current status of an Order: <span id ="status"> In Progress </span> </p>.
Which JavaScript statement changes thetext 'In Progress' to 'Completed' ?

A developer creates a genericfunction to log custom messages in the console. To do this, the function below is implemented.
01 function logStatus(status){
02 console./*Answer goes here*/{'Item status is: %s', status};
03 }
Which three console logging methods allow the use of string substitution in line 02?

正解:A,C,E 解答を投票する
Refer to the code below:
for(let number =2 ; number <= 5 ; number += 1 ) {
// insert code statement here
}
Thedeveloper needs to insert a code statement in the location shown. The code statement has these requirements:
1. Does require an import
2. Logs an error when the boolean statement evaluates to false
3. Works in both the browser and Node.js
Which meet the requirements?

Given the following code:

What is the output of line 02?

A developer wrote a fizzbuzz function thatwhen passed in a number, returns the following:
'Fizz' if the number is divisible by 3.
'Buzz' if the number is divisible by 5.
'Fizzbuzz' if the number is divisible by both 3 and 5.
Empty string if the number is divisible by neither 3 or 5.
Whichtwo test cases will properly test scenarios for the fizzbuzz function?
Choose 2 answers

正解:A,C,D 解答を投票する