24 modern ES6 code snippets to solve practical JS problems