Function Expressions in JavaScript #278
Replies: 2 comments
-
Posted at 2014-05-28 by DrAzzy I don't know any references for this - you really do need to understand how functions are defined, called, and used. I threw this together when I saw that there weren't any replies here - hope it's helpful (the meeting I was at was boooring...)
When you use functions as callbacks you refer to the function; you do not call it. If whatever's calling the callback function is supposed to pass arguments (like setWatch()), it will pass those arguments to the function, assuming the function accepts arguments.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-05-29 by Pat Hi, this is incredibly kind and very helpful. Fog begins to clear :) I think a hacking session or 10 will make this stick eventually! A million thanks. Pat |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-05-26 by Pat
Is there anyone here who can point me at a really good introduction to function expressions in JavaScript. I have a basic understanding now, but am constantly tripping up and much of the example code here relies on this. As some fundamental level, I am failing to 'get it' !
TIA
Pat
Beta Was this translation helpful? Give feedback.
All reactions