최신Salesforce Certified JavaScript Developer I - CRT-600무료샘플문제
문제1
Refer to the code below:
let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,"Car1 crashed in")); let car2 = new Promise(resolve => setTimeout(resolve,1500,"Car2 completed")); let car3 = new Promise(resolve => setTimeout(resolve,3000,"Car3 completed")); Promise.race([car1,car2,car3])
.then(value=>{
let result = `${value} the race.`;
}).catch(err=>{
console.log('Race is cancelled.',err);
});
What is the value of result when promise.race execues?
Refer to the code below:
let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,"Car1 crashed in")); let car2 = new Promise(resolve => setTimeout(resolve,1500,"Car2 completed")); let car3 = new Promise(resolve => setTimeout(resolve,3000,"Car3 completed")); Promise.race([car1,car2,car3])
.then(value=>{
let result = `${value} the race.`;
}).catch(err=>{
console.log('Race is cancelled.',err);
});
What is the value of result when promise.race execues?
정답: A
문제2
Which function should a developer use to repeatedly execute code at a fixed interval ?
Which function should a developer use to repeatedly execute code at a fixed interval ?
정답: D
문제3
A developer wants to set up a secure web server with Node.js. The developer creates a directory locally called app-server, and the first file is app-server/index.js Without using any third-party libraries, what should the developer add to index.js to create the secure web server?
A developer wants to set up a secure web server with Node.js. The developer creates a directory locally called app-server, and the first file is app-server/index.js Without using any third-party libraries, what should the developer add to index.js to create the secure web server?
정답: A
문제4
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?
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?
정답: C
문제5
Refer to the code below:
const addBy = ?
const addByEight =addBy(8);
const sum = addBYEight(50);
Which two functions can replace line 01 and return 58 to sum?
Choose 2 answers
Refer to the code below:
const addBy = ?
const addByEight =addBy(8);
const sum = addBYEight(50);
Which two functions can replace line 01 and return 58 to sum?
Choose 2 answers
정답: A,C
문제6
Given the HTML below:

Which statement adds the priority-account CSS class to the Universal Containers row?
Given the HTML below:

Which statement adds the priority-account CSS class to the Universal Containers row?
정답: A
문제7
developer uses the code below to format a date.

After executing, what is the value of formattedDate?
developer uses the code below to format a date.

After executing, what is the value of formattedDate?
정답: A
문제8
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);
}
}
What is the value of the array after the code executes?
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);
}
}
What is the value of the array after the code executes?
정답: C
문제9
Which code change should be done for the console to log the following when 'Click me!' is clicked'
> Row log
> Table log
Which code change should be done for the console to log the following when 'Click me!' is clicked'
> Row log
> Table log
정답: D
문제10
Which statement accurately describes an aspect of promises?
Which statement accurately describes an aspect of promises?
정답: B
문제11
Which two console logs output NaN?
Choose 2 answers | |
Which two console logs output NaN?
Choose 2 answers | |
정답: A,D