1.

Is JavaScript as Pass by value or pass by reference language?

Answer»

Interestingly enough, it is both. Primitive types like number, string, etc. are PASSED by value, but OBJECTS can be passed-by-value (when we consider a variable HOLDING an object is a REFERENCE to the object) and ALSO as a pass-by-reference (when we consider variable to the object is holding the object itself).



Discussion

No Comment Found