Compare commits

..

No commits in common. "15da4782019784b0656ce0df22c0932deb7bee2c" and "79fb72406d92055de61637a776a49234a38a177f" have entirely different histories.

View File

@ -159,22 +159,22 @@
undefined == null // -> true
// But in cases where the same operation is defined for both types
// the result may *seem* less predictable, for example `+` defines both
// number addition and string concatenation:
// the result may seem less predictable, for example `+` defines both
// number addition and string concatination:
1 + 2 // -> 3
'a' + 'b' // -> 'ab'
// But when mixed it reverts to concatenation:
// But when mixed it reverts to constructor:
1 + '2' // -> '12'
// This feature can both help make the code simpler and more generic if
// used consciously and at the same time can prove quite frustrating if
// used conciously and at the same time can prove quite frustrating if
// neglected.
//
// Note that this neglect and carelessness is the main reason it is quite
// popular to avoid type coercion and instead overuse strict comparisons
// and defensively over-check everything, at times raised to such levels
// as to define whole languages around this (like TypeScript).
// This neglect and carelessness is the main reason it is quite popular
// to avoid type coercion and instead overuse strict comparisons and
// deffensively over-check everything, at times raised to such levels as
// to define whole languages (like TypeScript) around this.
// Type checking