The behaviour of JavaScript is equivalent for references. (Call by sharing)
Yes, but the way function parameters are passed is the same. I wrote the swap function in JavaScript and it behaves exactly like the Java version, as opposed to the true "pass by reference" examples.