問題1
A developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality. The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
Which code logs an error at boot time with an event?
A developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality. The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
Which code logs an error at boot time with an event?
正確答案: A
說明:(僅 NewDumps 成員可見)
問題2
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
說明:(僅 NewDumps 成員可見)
問題3
Corrected code:
let a = " * " ;
let b = " ** " ;
// x = 3;
console.log(a);
What is displayed when the code executes?
Corrected code:
let a = " * " ;
let b = " ** " ;
// x = 3;
console.log(a);
What is displayed when the code executes?
正確答案: D
說明:(僅 NewDumps 成員可見)
問題4
A team at Universal Containers works on a big project and uses yarn to manage the project ' s dependencies.
A developer added a dependency to manipulate dates and pushed the updates to the remote repository. The rest of the team complains that the dependency does not get downloaded when they execute yarn .
What could be the reason for this?
A team at Universal Containers works on a big project and uses yarn to manage the project ' s dependencies.
A developer added a dependency to manipulate dates and pushed the updates to the remote repository. The rest of the team complains that the dependency does not get downloaded when they execute yarn .
What could be the reason for this?
正確答案: A
說明:(僅 NewDumps 成員可見)
問題5
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?
正確答案: C
說明:(僅 NewDumps 成員可見)
問題6
A test searches for:
< button class= " blue " > Checkout < /button >
But the actual HTML is:
< button > Checkout < /button >
The test fails because it expects a class that no longer exists.
What type of test outcome is this?
A test searches for:
< button class= " blue " > Checkout < /button >
But the actual HTML is:
< button > Checkout < /button >
The test fails because it expects a class that no longer exists.
What type of test outcome is this?
正確答案: A
說明:(僅 NewDumps 成員可見)
問題7
Refer to the following object:
const dog = {
firstName: ' Beau ' ,
lastName: ' Boo ' ,
get fullName() {
return this.firstName + ' ' + this.lastName;
}
};
How can a developer access the fullName property for dog?
Refer to the following object:
const dog = {
firstName: ' Beau ' ,
lastName: ' Boo ' ,
get fullName() {
return this.firstName + ' ' + this.lastName;
}
};
How can a developer access the fullName property for dog?
正確答案: D
說明:(僅 NewDumps 成員可見)
問題8
Given the code below:
01 setCurrentUrl();
02 console.log( " The current URL is: " + url);
03
04 function setCurrentUrl() {
05 url = window.location.href;
06 }
What happens when the code executes?
Given the code below:
01 setCurrentUrl();
02 console.log( " The current URL is: " + url);
03
04 function setCurrentUrl() {
05 url = window.location.href;
06 }
What happens when the code executes?
正確答案: B
說明:(僅 NewDumps 成員可見)
問題9
Corrected code:
let obj = {
foo: 1,
bar: 2
};
let output = [];
for (let something in obj) {
output.push(something);
}
console.log(output);
What is the output of line 11?
Corrected code:
let obj = {
foo: 1,
bar: 2
};
let output = [];
for (let something in obj) {
output.push(something);
}
console.log(output);
What is the output of line 11?
正確答案: C
說明:(僅 NewDumps 成員可見)
問題10
Refer to the code below:
let strNumber = ' 12345 ' ;
Which code snippet shows a correct way to convert this string to an integer?
Refer to the code below:
let strNumber = ' 12345 ' ;
Which code snippet shows a correct way to convert this string to an integer?
正確答案: C
說明:(僅 NewDumps 成員可見)