iterate over the elements in array, transform its elements and include the result in new array.
example:
cycles through each number in the array and reduce the array to a single value by excuting function on each value and the return value of the function is dtored in an accumulator.
syntax : array.reduce( function(total, currentValue, currentIndex, arr), initialValue ).
example :
A callback function is a function that gets passed as an argument into a parent function call.
A callback can be used synchronously or asynchronously.
There’s a difference in the order in which things happen in the timeline, depending on whether the callback is used synchronously or asynchronously.