Notifications
Clear all

Which two tests are the most accurate for this array? Choose 2 answers:

1 Posts
1 Users
0 Likes
128 Views
(@sitesmario)
Posts: 734
Noble Member
Topic starter
 

The developer wants to test the array shown:

const arr = Array(5).fill(0)

Which two tests are the most accurate for this array? Choose 2 answers:

  • A . console.assert( arr.length === 5 );
    B. arr.forEach(elem => console.assert(elem === 0)) ;
    C. console.assert(arr[0] === 0 && arr[ arr.length] === 0);
    D. console.assert (arr.length >0);

Show Answer Hide Answer

Suggested Answer: A,B
 
Posted : 04/01/2023 12:11 am

Latest Salesforce JavaScript Developer I Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: