JavaScript-Developer-I Exam Question 66

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
  • JavaScript-Developer-I Exam Question 67

    Refer to the following code:
    function test (val) {
    If (val === undefined) {
    return 'Undefined values!' ;
    }
    if (val === null) {
    return 'Null value! ';
    }
    return val;
    }
    Let x;
    test(x);
    What is returned by the function call on line 13?
  • JavaScript-Developer-I Exam Question 68

    A developer copied a JavaScript object:

    How does the developer access dan's forstName,lastName? Choose 2 answers
  • JavaScript-Developer-I Exam Question 69

    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 ?
  • JavaScript-Developer-I Exam Question 70

    A developer creates a generic function to log custom messages In the console. To do this, the function below is implemented.

    Which three console logging methods allow the use of string substitution in line 02?
    Choose 3 answers