Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
HitWRight64035dFor the Lord, delete that if block... Or is it the notorious JS?
ddit39035dIf it is null return it and if it is not null return it.
If you are at a red light drive forward, if you are not at a red light drive forward.
If you are suicidal, kill yourself, if you are not suicidal, kill yourself.
AlgoRythm4638835dI thought handlebars was long dead
theuser481634d@HitWRight Yes, they use the same comparison algorithm, but the triple equals will not convert falsey and truthy values before comparing.
If you do "undefined == null" it will return true because both values are coerced to false (they are falsey).
"Boolean(undefined) === Boolean(null)" will return true because you are doing a manual explicit conversion beforehand.