Question 6

A developer is asked to fix some bugs reported by users. To do that, the developer adds a breakpoint for debugging.
Function Car (maxSpeed, color){
This.maxspeed =masSpeed;
This.color = color;
Let carSpeed = document.getElementById(' CarSpeed');
Debugger;
Let fourWheels =new Car (carSpeed.value, 'red');
When the code execution stops at the breakpoint on line 06, which two types of information are available in the browser console ?
Choose 2 answers:
  • Question 7

    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?
  • Question 8

    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. THe constructor sets the name to the first value passed in. The pseudocode is below:
    Class Item {
    constructor(name, price) {
    ... // Constructor Implementation
    }
    }
    Class SaleItem extends Item {
    constructor (name, price, discount) {
    ...//Constructor Implementation
    }
    }
    There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.
    Let regItem =new Item('Scarf', 55);
    Let saleItem = new SaleItem('Shirt' 80, -1);
    Item.prototype.description = function () { return 'This is a ' + this.name; console.log(regItem.description()); console.log(saleItem.description()); SaleItem.prototype.description = function () { return 'This is a discounted ' + this.name; } console.log(regItem.description()); console.log(saleItem.description()); What is the output when executing the code above ?
  • Question 9

    A developer has an ErrorHandler module that contains multiple functions.
    What kind of export be leverages so that multiple functions can be used?
  • Question 10

    Refer to code below:
    console.log(0);
    setTimeout(() => (
    console.log(1);
    });
    console.log(2);
    setTimeout(() => {
    console.log(3);
    ), 0);
    console.log(4);
    In which sequence will the numbers be logged?