최신Salesforce Certified JavaScript Developer (JS-Dev-101) - JavaScript-Developer-I무료샘플문제
문제1
Refer to the code below:
01 const server = require( ' server ' );
02
03 // Insert code here
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the server.
Which code should be inserted at line 03 to set up an event and start the web server?
Refer to the code below:
01 const server = require( ' server ' );
02
03 // Insert code here
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the server.
Which code should be inserted at line 03 to set up an event and start the web server?
정답: B
설명: (ExamPassdump 회원만 볼 수 있음)
문제2
Refer to the code below:
01 x = 3.14;
02
03 function myFunction() {
04 ' use strict ' ;
05 y = x;
06 }
07
08 z = x;
09 myFunction();
Considering the implications of ' use strict ' on line 04, which three statements describe the execution of the code?
Refer to the code below:
01 x = 3.14;
02
03 function myFunction() {
04 ' use strict ' ;
05 y = x;
06 }
07
08 z = x;
09 myFunction();
Considering the implications of ' use strict ' on line 04, which three statements describe the execution of the code?
정답: C,D,E
설명: (ExamPassdump 회원만 볼 수 있음)
문제3
A developer executes:
document.cookie;
document.cookie = ' key=John Smith ' ;
What is the behavior?
A developer executes:
document.cookie;
document.cookie = ' key=John Smith ' ;
What is the behavior?
정답: C
설명: (ExamPassdump 회원만 볼 수 있음)
문제4
Refer to the code declarations below:
let str1 = ' Java ' ;
let str2 = ' Script ' ;
Which three expressions return the string JavaScript?
Refer to the code declarations below:
let str1 = ' Java ' ;
let str2 = ' Script ' ;
Which three expressions return the string JavaScript?
정답: B,C,D
설명: (ExamPassdump 회원만 볼 수 있음)
문제5
Refer to the following code:
< html lang= " en " >
< body >
< button class= " secondary " > Save draft < /button >
< button class= " primary " > Save and close < /button >
< /body >
< script >
function displaySaveMessage(event) {
console.log( ' Save message. ' );
}
function displaySuccessMessage(event) {
console.log( ' Success message. ' );
}
window.onload = function() {
document.querySelector( ' .secondary ' )
.addEventListener( ' click ' , displaySaveMessage, true);
document.querySelector( ' .primary ' )
.addEventListener( ' click ' , displaySuccessMessage, true);
}
< /script >
< /html >
Refer to the following code:
< html lang= " en " >
< body >
< button class= " secondary " > Save draft < /button >
< button class= " primary " > Save and close < /button >
< /body >
< script >
function displaySaveMessage(event) {
console.log( ' Save message. ' );
}
function displaySuccessMessage(event) {
console.log( ' Success message. ' );
}
window.onload = function() {
document.querySelector( ' .secondary ' )
.addEventListener( ' click ' , displaySaveMessage, true);
document.querySelector( ' .primary ' )
.addEventListener( ' click ' , displaySuccessMessage, true);
}
< /script >
< /html >
정답: D
설명: (ExamPassdump 회원만 볼 수 있음)
문제6
Refer to the code:
01 const exec = (item, delay) = >
02 new Promise(resolve = > setTimeout(() = > resolve(item), delay));
03
04 async function runParallel() {
05 const [result1, result2, result3] = await Promise.all(
06 [exec( ' x ' , ' 100 ' ), exec( ' y ' , ' 500 ' ), exec( ' z ' , ' 100 ' )]
07 );
08 return `parallel is done: ${result1}${result2}${result3}`;
09 }
Which two statements correctly execute runParallel()?
Refer to the code:
01 const exec = (item, delay) = >
02 new Promise(resolve = > setTimeout(() = > resolve(item), delay));
03
04 async function runParallel() {
05 const [result1, result2, result3] = await Promise.all(
06 [exec( ' x ' , ' 100 ' ), exec( ' y ' , ' 500 ' ), exec( ' z ' , ' 100 ' )]
07 );
08 return `parallel is done: ${result1}${result2}${result3}`;
09 }
Which two statements correctly execute runParallel()?
정답: B,C
설명: (ExamPassdump 회원만 볼 수 있음)
문제7
A developer imports:
import printPrice from ' /path/PricePrettyPrint.js ' ;
What must be true about printPrice for this import to work?
A developer imports:
import printPrice from ' /path/PricePrettyPrint.js ' ;
What must be true about printPrice for this import to work?
정답: A
설명: (ExamPassdump 회원만 볼 수 있음)
문제8
01 function Monster() { this.name = ' hello ' ; };
02 const m = Monster();
What happens due to the missing new keyword?
01 function Monster() { this.name = ' hello ' ; };
02 const m = Monster();
What happens due to the missing new keyword?
정답: B
설명: (ExamPassdump 회원만 볼 수 있음)
문제9
A developer needs the function personalizeWebsiteContent to run when the webpage is fully loaded (HTML and all external resources).
Which implementation should be used?
A developer needs the function personalizeWebsiteContent to run when the webpage is fully loaded (HTML and all external resources).
Which implementation should be used?
정답: A
설명: (ExamPassdump 회원만 볼 수 있음)
문제10
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
설명: (ExamPassdump 회원만 볼 수 있음)