If you are new to JavaScript, chances are you’ve already run into some of the funny behavior this language has to offer (exhibit A). At first, these weird quirks might seem ridiculous and frustrating, but I promise there is a method behind all of that madness.

One of the hardest hurdles to overcome, in my humble opinion, is the difference between passing by value vs passing by reference. _Why is this concept so tricky? _For starters, you can certainly get pretty far without really understanding how JavaScript interacts with primitive values and reference values. This can, and more often than not, will result in a ton of bugs that are hard to track down and annoying to fix. Secondly, this is a concept that WILL come up in technical interviews, so not understanding it will count as a huge red flag against you.

#javascript #coding #javascript-tips

Pass By Value vs Pass By Reference in JavaScript
2.00 GEEK