Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js call by reference

var a = {};
var func = function(b) { // callee
  b.a = 1;
}
func(a); // caller
console.log(a.a); // 1
Source by perfectacle.github.io #
 
PREVIOUS NEXT
Tagged: #js #call #reference
ADD COMMENT
Topic
Name
5+5 =