Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js store function in variable

var foo = function(a){ return a * 2; }
var bar = foo(2);

foo = function(a){ return a / 2; }

bar = foo(bar);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #store #function #variable
ADD COMMENT
Topic
Name
5+9 =