Question 21

Refer to the following array:
Let arr1 = [ 1, 2, 3, 4, 5 ];

Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?
  • Question 22

    Refer to the following code:
    01 function Tiger(){
    02 this.Type = 'Cat';
    03 this.size = 'large';
    04 }
    05
    06 let tony = new Tiger();
    07 tony.roar = () =>{
    08 console.log('They\'re great1');
    09 };
    10
    11 function Lion(){
    12 this.type = 'Cat';
    13 this.size = 'large';
    14 }
    15
    16 let leo = new Lion();
    17 //Insert code here
    18 leo.roar();
    Which two statements could be inserted at line 17 to enable the function call on line 18?
    Choose 2 answers.
  • Question 23

    A developer wants to use a module named universalContainerLib and then call functions from it.
    How should a developer import every function from the module and then call the functions foo and bar?
  • Question 24

    Refer to the code below:
    const event = new CustomEvent(
    //Missing Code
    );
    obj.dispatchEvent(event);
    A developer needs to dispatch a custom event called update to send information about recordId.
    Which two options could a developer insert at the placeholder in line 02 to achieve this?
    Choose 2 answers
  • Question 25

    A developer creates a class that represents a blog post based on the requirement that a Post should have a body author and view count.
    The Code shown Below:
    Class Post {
    // Insert code here
    This.body =body
    This.author = author;
    this.viewCount = viewCount;
    }
    }
    Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instanceof a Post with the three attributes correctly populated?