MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/btxz72/what_are_some_javascript_things_beginners_dont/ep4ookc/?context=3
r/javascript • u/[deleted] • May 28 '19
383 comments sorted by
View all comments
28
coercion in general
false == 'false' // false false == '' // true false === '' // false var x = false || 'foo' // x is 'foo' var y = true || 'foo' // y is true var z = y && x // z is 'foo'
45 u/[deleted] May 28 '19 Most of these have nothing to do with coercion.I guess you're right about people struggling with it. 2 u/DerGernTod May 28 '19 i agree only the first two have something to do with coercion, the latter were rather some other things js noobs may be confused about.
45
Most of these have nothing to do with coercion.
I guess you're right about people struggling with it.
2 u/DerGernTod May 28 '19 i agree only the first two have something to do with coercion, the latter were rather some other things js noobs may be confused about.
2
i agree only the first two have something to do with coercion, the latter were rather some other things js noobs may be confused about.
28
u/DerGernTod May 28 '19
coercion in general