Look at this article: http://www.hunlock.com/blogs/Functional_Javascript

It explains a lot of things about functions including your question

>
> I found Jörn Zaefferer's "jQuery plugin authoring guide" at
> http://bassistance.de/2006/12/27/jquery-plugin-authoring-guide/,
> there i found javascript syntax like this:
> ========================
> (function() {
>  // some code here
> })();
> ========================
> (function($) {
>  // some code here
> })(jQuery);
> ========================
> it really works,but i donno what exactly this syntax means,anyone can
> explain it? great thanks!
>

Reply via email to