JavaScript-Developer-I Exam Question 101

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

    A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.
    Here is the HTML file content:
    <input type =" text" value="Hello" name ="input">
    <button type ="button" >Display </button> The developer wrote the javascript code below:
    Const button = document.querySelector('button');
    button.addEvenListener('click', () => (
    Const input = document.querySelector('input');
    console.log(input.getAttribute('value'));
    When the user clicks the button, the output is always "Hello".
    What needs to be done to make this code work as expected?
  • JavaScript-Developer-I Exam Question 103

    Considering the implications of 'use strict' on line 04, which three statements describe the execution of the code?
    Choose 3 answers
  • JavaScript-Developer-I Exam Question 104

    Given two expressions var1 and var2. What are two valid ways to return the logical AND of the two expressions and ensure it is data type Boolean ?
    Choose 2 answers:
  • JavaScript-Developer-I Exam Question 105

    Which statement accurately describes an aspect of promises?