What is the value of the array after the code executes?
Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i < array.length; i++){
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of the array after the code executes?
A . [1, 2, 3, 4, 5, 4, 4]
B . [1, 2, 3, 4, 4, 5, 4]
C . [1, 2, 3, 4, 5, 4]
D . [1, 2, 3, 5]
Answer: C
Latest JavaScript Developer I Dumps Valid Version with 144 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments