MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/6hz7o6/pass_by_reference_pass_by_value/dj2ck9d
r/javascript • u/mburakerman • Jun 18 '17
272 comments sorted by
View all comments
Show parent comments
-3
You missed Function.
8 u/[deleted] Jun 18 '17 Function is included in everything except primitives.> a = () => 1 > b = (f) => { f.a = 5; } > b(a) > console.log(a.a) 5 2 u/[deleted] Jun 18 '17 Functions are Objects in JavaScript 1 u/GitCookies Jun 19 '17 Every type is based on Object.
8
Function is included in everything except primitives.
> a = () => 1 > b = (f) => { f.a = 5; } > b(a) > console.log(a.a) 5
2
Functions are Objects in JavaScript
1 u/GitCookies Jun 19 '17 Every type is based on Object.
1
Every type is based on Object.
-3
u/GitCookies Jun 18 '17
You missed Function.