May 14, 2019
Falsy and Truthy values & Arrow Functions in JS
Falsy and truthy values in Javascript Falsy values in JavaScript are false, null, undefined, 0, NaN, ““ (empty strings). The following construct: let val = ...; if (!val) { // Execute } ... will always Execute if the val contains one of the above values. Truthy values are all others.…