Hacker News new | past | comments | ask | show | jobs | submit login

that answer doesn't concern with the pass-by semantic, only with the primitive/object semantics.

this is the gist of the issue, fetched from http://javadude.com/articles/passbyvalue.htm about java but exemplifies perfectly the pass by reference semantics:

"If you can write such a method/function in your language such that calling

Type var1 = ...; Type var2 = ...; swap(var1,var2); actually switches the values of the variables var1 and var2, the language supports pass-by-reference semantics."

as java javascript is reference-by-value




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: