There is an ability within JavaScript to create a function on the fly. This doesn’t have to be a named, globally available function. It can be very ad hoc.
These are called Anonymous Functions.
function(txt){alert(txt);} ("I am the text message" );
That’s an unnamed function. It’s defined and executed immediately. If you have code that only needs to be executed once then you’ll want to use Anonymous Functions.
Tagged As Javascript
Comments are Open (0)
Posted at 01:03 PM