The output for the above code is:
JAVASCRIPT
1First argument is an array: Hello John,Hello Tina,Hello Kale,Hello Max
2Argument passed to secondFunction is a string.
A higher-order function, useReturnFunc()
, takes the function fn()
as an input argument and returns another function, secondFunction()
.