JS-Dev-101試験無料問題集「Salesforce Certified JavaScript Developer - Multiple Choice 認定」
A developer uses a parsed JSON string to work with user information as in the block below:
01 const userInformation = {
02 "id": "user-01",
03 "email": "[email protected]",
04 "age": 25
05 };
Which two options access the email attribute in the object?
01 const userInformation = {
02 "id": "user-01",
03 "email": "[email protected]",
04 "age": 25
05 };
Which two options access the email attribute in the object?
正解:C,D
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
A developer at Universal Containers creates a 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 to do some custom initialization when the webpage is fully loaded with HTML content and all related files.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed to do some custom initialization when the webpage is fully loaded with HTML content and all related files.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?
正解:A
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
A developer is setting up a new Node.js server with a client library that is built using events and callbacks.
The library:
Will establish a web socket connection and handle receipt of messages to the server.
Will be imported with require, and made available with a variable called ws.
The developer also wants to add error logging if a connection fails.
Given this information, which code segment shows the correct way to set up a client with two events that listen at execution time?
The library:
Will establish a web socket connection and handle receipt of messages to the server.
Will be imported with require, and made available with a variable called ws.
The developer also wants to add error logging if a connection fails.
Given this information, which code segment shows the correct way to set up a client with two events that listen at execution time?
正解:D
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
Refer to the code below (assuming Promise.race is intended):
let cat3 = new Promise(resolve =>
setTimeout(resolve, 3000, "Cat 3 completes")
);
Promise.race([cat1, cat2, cat3])
.then(value => {
let result = `${value} the race.`;
})
.catch(err => {
console.log("Race is cancelled:", err);
});
(Assuming cat1 and cat2 are similar to earlier examples: cat2 resolves fastest.) What is the value of result when Promise.race executes?
let cat3 = new Promise(resolve =>
setTimeout(resolve, 3000, "Cat 3 completes")
);
Promise.race([cat1, cat2, cat3])
.then(value => {
let result = `${value} the race.`;
})
.catch(err => {
console.log("Race is cancelled:", err);
});
(Assuming cat1 and cat2 are similar to earlier examples: cat2 resolves fastest.) What is the value of result when Promise.race executes?
正解:D
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)