Is JavaScript a pass-by-reference or pass-by-value language?
Javascript by reference vs. by value [duplicate]