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