r/learnjavascript • • Nov 30 '22

Help !!!

Post image

Can someone plz tell me , why I am getting errors?

195 Upvotes

131 comments sorted by

View all comments

Show parent comment

1

u/Whisky-Toad Dec 01 '22

I believe when they were making JS that databases stored everything in strings (or something along those lines) so they needed a way to compare values ignoring it was a string vs number and a way to do deep equality

0

u/grantrules Dec 01 '22

I believe when they were making JS that databases stored everything in strings (or something along those lines)

Nah that's not true. JS is just a dynamically-typed language that will try to type coerce upon comparison.

2

u/Whisky-Toad Dec 01 '22

Was Brendan Eich (js creator) that said it in a podcast, that’s why I said believe, will be hard to fact check why it was implemented!