javascript beutifies code example
Example 1: javascript falsy
// Falsy values:
0
''
undefined
null
NaN
Example 2: javascript truncate string
var string = "ABCDEFG";
var truncString = string.substring(0, 3); //Only keep the first 3 characters
console.log(truncString); //output: "ABC"