for example
step 1 -
function add(a,b){return a+b;}
step 2-
add(3,4);
result 7
Javascript provides an approach to declare and execute the function immediately. Which is known as IIFE(Immediately Invoked Function Expression)
Example:
(
function add(x,y){
alert(x+y);
})();
No comments:
Post a Comment