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*/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Self #Invoking #Function #Simpler #Syntax
ADD COMMENT
Topic
Name
2+8 =