javascript icon indicating copy to clipboard operation
javascript copied to clipboard

is 'Higher Order Functions' as the same as 'javascript closure'?

Open ldong opened this issue 10 years ago • 2 comments

In 6.2 Higher Order Functions, could you tell the difference compare to javascript closure?

For me this so called 'Higher order functions' is exactly how I understand 'closure'. If I'm right, please add 'this is what other people called closure' at the end of this section. It surely will clarify the misunderstanding.

@SamyPesse @AaronO Thank you

ldong avatar May 06 '14 06:05 ldong

In JS, Higher Order Functions are also known as Callbacks. Concept of closures is different.

mrsaeeddev avatar Jul 21 '17 06:07 mrsaeeddev

Higher Order Functions are functions that either takes function as an argument or returns function and closure is a different concept. so what is closure ? -- closure is a power of inner function where it is able to access variables from outer function even after the outer function is returned.

SivaNagaKalyan avatar Aug 09 '22 06:08 SivaNagaKalyan