Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Self Invoking Function Simpler Syntax

(function () {
			  console.log("first");
			  $ = function (){
				  console.log("second");
			  }	  
		  })()
          /*without the $= part in the other example, $() can be invoked outside the function*/
 
PREVIOUS NEXT
Tagged: #Self #Invoking #Function #Simpler #Syntax
ADD COMMENT
Topic
Name
7+7 =