re: Master value vs reference in JavaScript VIEW POST

FULL DISCUSSION
 

Primitives really might be assigned by reference, especially strings. Maybe you have confused JavaScript and Java semantics? JavaScript doesn't really have this primitive value concept in its design even if the underlying compiler might have some optimizations that pass numbers by calling rather than reference.

 

I know I'm not using correct terminology, but I think the way I've explained it is easiest for someone who has very little programming knowledge to understand. Although it's technically not correct it explains the behavior of JavaScript with a simple model.

 

This article is aimed towards beginners looking for their first job. I didn't want to get technically deep. This was meant to encourage people to look into these concepts further.

code of conduct - report abuse