A
Q. What will be printed in the console on execution of the following JS code:
Code:
var array = [2, 4, 6, 7, 8, 10];
var myArr= array.filter(v => v / 2 === 0);
console.log(myArr);
var myArr= array.filter(v => v / 2 === 0);
console.log(myArr);
- Correct Answer - Option(B)
- Views: 9
- Filed under category JavaScript
- Hashtags:
Discusssion
Login to discuss.