πŸ“Š JavaScript
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) [2, 4, 6, 8, 10]

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
180
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
85%
Success Rate