Skip to content

Instantly share code, notes, and snippets.

@souhe
Created November 20, 2018 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souhe/6610aaace7b263f9e13108df644056cc to your computer and use it in GitHub Desktop.
Save souhe/6610aaace7b263f9e13108df644056cc to your computer and use it in GitHub Desktop.
let data = [1, 3, 5, 2, 0, 4];
let betterData = data
.filter(a => a !== 0)
.map(a => a * 2)
.map(a => a.toString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment