Invoke anonymous function in .js


/ Published in: JavaScript
Save to your folder(s)

Good for isolating code inside from global vars. Example, pass jquery references from the window scope


Copy this code and paste it in your HTML
  1. (function(){
  2. alert('invoke moi')
  3. })();

Report this snippet


Comments


You need to login to view comments.