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);
β
Correct Answer: (B)
[2, 4, 6, 8, 10]