Hello Guys today i am going to discuss a very little thing that you might have not noticed in Javascript.
I will show you that thing using an examp...
For further actions, you may consider blocking this person and/or reporting abuse
It depends on what do you consider equal.
Both have the same length and values, are they "equal"?
There are a bunch of workarounds to cover all meanings depending on what do you consider equal.
Tricky topic! 😂
All i wanted to show how complicated Javascript language is 😂😂
That will do I guess 😂
Yeah 😂😂
toString() is a not good way (or is good is array's element are primitives). Check that example:
Agree. And we can see the reason why doing
JSON.stringify
on the other hand, works better on this:because
And with
JSON.stringify
these two will not be equal:Actually they are somewhat different (some props are not in the same order).
That's why this question is so tricky 😂
I let you a couple of snippets that can be useful in certain situations:
Discussing them could deal to an entire post probably 😂
Cheers!
Again complicated but beautiful
Again you showed us another example of why javascript is complicated
Javscrtipt is fabulous:
😂 Good one!
😂😂😂😂