Can forEach method of an array be considered as an example of immediately invoked function expression (IIFE) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can forEach method of an array be considered as an example of immediately invoked function expression (IIFE)

9th Aug 2022, 9:24 PM
Oluwagbotemi Oyeboade
Oluwagbotemi Oyeboade - avatar
1 Answer
+ 1
Well inside forEach you add function what is run behind the hood itself, so it just act like IIFE. When we tolk about IIFE we mean functions defined by developer what run right after thay are declared. Fuction inside forEach are named callback
9th Aug 2022, 9:49 PM
PanicS
PanicS - avatar