Important Don - T Skip
Important Don - T Skip
Ans1: runParallel().done(function(data){
Ans2: runParallel().then(function(data){
2. A class was written to represent items for purchase in an online store, and a
second class representing items that are on sale at a discounted price.
Ans: 50
80
50
72
3. A developer removes the checkout button that looked like this:
Ans: false negative
4. Refer to the code below:
01 function changeValue(param){
Ans: 10-10
5.Refer to the following code:
01 class Vehicle{
Ans: super(plate);
6. Given the code below:
const delay = async delay => {
Ans: 2 1 3
7. Refer to the code snippet:
01 let array = [1,2,3,4,4,5,4,4];
Ans: [1,2,3,5]
8. Which three statements are true about promises?
Ans1: A promise has a .then() method
Ans2: A fulfilled or rejected promise will not change states
Ans3: A pending promise can become fulfilled, settled, or rejected.
9. Refer to the code:
01 function Vehicle(name, price) {
Ans: 01 class Vehicle {
02 constructor(name,price) {
03 this.name = name;
04 this.price = price;
05 }
06 priceInfo() {
07 return 'Cost of the ${this.name} is ${this.price}$';
08 }
09 }
10. A developer has code that calculates a restaurant bill, but generates incorrect
answers while testing the code.
01 function calculateBill(items){
Ans: using the debugger command on line 05.
11. Given a value, which two options can a developer use to detect if the value is
NaN?
Ans1: Object.is(value, NaN)
Ans2: isNaN(value)
12. Refer to the following code that imports a module named Utils:
Ans1: export default class {
Ans2: const foo = {} => {return 'foo';}
const bar = {} => {return 'bar';}
export {foo, bar}
13. Refer to the code below:
01 const event = new CustomEvent(
Ans1: 'update', {
detail : {
recordId : '123abc'
}
}
Ans2: 'update', {
recordId : '123abc'
}
14. A developer is setting up a Node.js server with a client library that is built
using events and callbacks.
Ans: ws.on('connect'. () => {
console.log('Connected to client');
}};