Parameter: It accepts a parameter “callback” function which produces each element of the new typedArray and this function takes three parameter that are specified below-
- currentValue: It is the value of the current element which is being processed in the typedArray.
- index: It is the index of the current element being processed in the array.
- array: It is the array on which forEach() function is being called.
Return Value: It does not return anything.
a = 1 a = 3 a = 5 a = 7 a = 2 a = 4 a = 6 a = 8