James is a JavaScript Developer, Speaker, and Teacher with a passion for teaching developers through content.Β He is a full-time Technical Content Creator with years of experience in Software Developme
This is a great clarification. I can't think of a reasonable scenario where you would pass a function without the expectation that it's going to be called. Because of that, I think it would be implied, but this is a great callout.
It's not as simple as this. To be considered a callback, it really needs to be called by the code it is passed to.
This is a great clarification. I can't think of a reasonable scenario where you would pass a function without the expectation that it's going to be called. Because of that, I think it would be implied, but this is a great callout.
A few random possibilities off the top of my head: