Type Conversion: Falsy not truthy

2
closed
Faizan-e-Muhammad97
Faizan-e-Muhammad97
Posted 4 months ago

Type Conversion: Falsy not truthy #1971

Issue described in this closed PR still exists: Falsy not truthy #1382

Content on line 34 of javascript/concepts/type-conversion/introduction.md

Note that because of the described rules, '0', 'false', [] and {} are thruthy in JavaScript.

This is an error as 0 and false are clearly present in the list of falsy values in the docs https://developer.mozilla.org/en-US/docs/Glossary/Falsy

SleeplessByte
SleeplessByte
Created 4 months ago

0 is falsy, but the string literal of 0 '0' is not, whereas it is in some languages. false is falsy (this would be horrible if it wasn't), but the string literal of false 'false' is not, whereas it is in some languages.

Hope this clears that up.

You can supply a PR to clear up the language if you wish.

Faizan-e-Muhammad97
Faizan-e-Muhammad97
Created 4 months ago

@SleeplessByte thanks for the clarification. I totally missed the quotation marks.