Which JavaScript method is used to call a function (a callback function) once for each array element?

67. Which JavaScript method is used to call a function (a callback function) once for each array element?

  1. for()
  2. traverse()
  3. forEach()
  4. foreach()

Answer: C) forEach()

Explanation:

The JavaScript method forEach() is used to call a function (a callback function) once for each array element.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.