KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was reading JS sources from Twitter — on my way to improve my JS knowledge base, when I came across the strange way of calling anonymous function: !function( $ ) { ... }( window.jQuery ); ... and this works! :) It's obvious to everyone, that this: function ( $ ) { ... } ( window.jQuery ) does not work (Syntax error), while this one is correct: (function ( $ ) { .... })( window.jQuery ) Can anyone please explain this magic (why case with !function works)?
Tags (comma-separated)
Save Edits
Cancel