Pass By Reference Vs Pass By Value Javascript