Is there a way to accomplish the same thing as returning references in php using javascript ?
for example suppose i want to use a function to find to which variable a reference should be bound, in php i can use an ampersand before a function , how can i do something like this in javascript ?
EDIT : if not possible can i do something similar ?
Thanks.
No, there is no way to use references:
Is impossible in Javascript because you can only have two primitives, not two pointers to the same primitive.
There should be another way to accomplish what you want to do though. Without using references.