JS-Dev-101 Exam Question 46

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?
  • JS-Dev-101 Exam Question 47

    Refer to thecode below:
    Const pi = 3.1415326,
    What is the data type of pi?
  • JS-Dev-101 Exam Question 48

    Refer to the code below:
    Let textValue = '1984';
    Which code assignment shows a correct way to convert this string to an integer?
  • JS-Dev-101 Exam Question 49

    Refer to the code below:
    let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,"Car1 crashed in")); let car2 = new Promise(resolve => setTimeout(resolve,1500,"Car2 completed")); let car3 = new Promise(resolve => setTimeout(resolve,3000,"Car3 completed")); Promise.race([car1,car2,car3])
    .then(value=>{
    let result = `${value} the race.`;
    }).catch(err=>{
    console.log('Race is cancelled.',err);
    });
    What is the valueof result when promise.race execues?

    JS-Dev-101 Exam Question 50

    Refer to the code:

    Given the code above, which three properties are set for pet1? Choose 3 answers