Nicely explained. Another quirk of JavaScript I'l know to look out for, but your JSON solution is simple to remember.
JSON is your quick and dirty solution. For a more robust solution, I’d go with Lodash 🙂
I don't think this is javascript specific? And no, it's not a quirk. Even Java(and most other languages) copies non-primitive data types by reference. Maybe I misunderstood your comment though.
I'm a primarily a PHP developer so everything about JavaScript is quirky to me. :-)
Let's just pretend I left the obligatory, "But php has a,b,c,d....x,y,z quirks and javascript is so much better" ;)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nicely explained. Another quirk of JavaScript I'l know to look out for, but your JSON solution is simple to remember.
JSON is your quick and dirty solution. For a more robust solution, I’d go with Lodash 🙂
I don't think this is javascript specific? And no, it's not a quirk.
Even Java(and most other languages) copies non-primitive data types by reference.
Maybe I misunderstood your comment though.
I'm a primarily a PHP developer so everything about JavaScript is quirky to me. :-)
Let's just pretend I left the obligatory, "But php has a,b,c,d....x,y,z quirks and javascript is so much better" ;)