Q. What will this return?

Code:
[1, 2, 3].includes(2);
  • (A) true
  • (B) false
  • (C) undefined
  • (D) NaN
πŸ’¬ Discuss
βœ… Correct Answer: (A) true
Explanation: includes() checks if the element is present and returns true or false.
Explanation by: Chandani
includes() checks if the element is present and returns true or false.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
75
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
90%
Success Rate