Skip to content

Latest commit

 

History

History
14 lines (8 loc) · 231 Bytes

jsvalueorreference.md

File metadata and controls

14 lines (8 loc) · 231 Bytes

JS: Value or reference ?

Short answer: Passing primitive types (strings numbers booleans) are passed by object. Objects are passed by reference.

var a;
function foo(a) {

}

```

The followup question would be: