Question 21

Refer to code below:
Const objBook = {
Title: 'Javascript',
};
Object.preventExtensions(objBook);
Const newObjBook = objBook;
newObjectBook.author ='Robert';
What are the values of objBook and newObjBook respectively ?
  • Question 22

    Given the code below:
    Setcurrent URL ();
    console.log('The current URL is: ' +url );
    functionsetCurrentUrl() {
    Url = window.location.href:
    What happens when the code executes?
  • Question 23

    Refer to the code below:
    01 const exec = (item, delay) =>{
    02 newPromise(resolve => setTimeout( () => resolve(item), delay)),
    03 async function runParallel() {
    04 Const (result1, result2, result3) = await Promise.all{
    05 [exec ('x', '100') , exec('y', 500), exec('z', '100')]
    06 );
    07 return `parallel is done: $(result1)$(result2)$(result3)`;
    08 }
    }
    }
    Which two statements correctly execute the runParallel () function?
    Choose 2 answers
  • Question 24

    Refer the following code

    what is the value of array after code executes?

    Question 25

    A developer has the following array of student test grades:
    Let arr = [ 7, 8, 5, 8, 9 ];
    The Teacher wants to double each score and then see an array of the students who scored more than 15 points.
    How should thedeveloper implement the request?