A

Admin • 828.03K Points
Coach

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);
  • (A) [7]
  • (B) [2, 4, 6, 8, 10]
  • (C) [2, 4, 6, 7, 8, 10]
  • (D) myArr
  • Correct Answer - Option(B)
  • Views: 9
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.