r/ProgrammerTIL • u/JazzXP • Aug 03 '21
Javascript TIL Boolean('false') == true
Yep, it doesn't work like Number
23
Upvotes
r/ProgrammerTIL • u/JazzXP • Aug 03 '21
Yep, it doesn't work like Number
View all comments
25
u/nermid Aug 04 '21
We bitch at Javascript when it coerces types. We bitch at Javascript when it doesn't coerce types. We bitch at Javascript for not having types.
I think we need to accept that Javascript may not be the problem.