Skip to content

Instantly share code, notes, and snippets.

@Chesare22
Last active September 10, 2020 18:37
Show Gist options
  • Save Chesare22/bafd10f0cd0f12e9ba24be23e4050fd8 to your computer and use it in GitHub Desktop.
Save Chesare22/bafd10f0cd0f12e9ba24be23e4050fd8 to your computer and use it in GitHub Desktop.
const numbers = [5, 8, 1, 0, 10, -4];
// Tanto usingFunction como usingArrow resultan en [5, 8, 10]
const usingFunction = numbers.filter(function(number){
return number > 3;
});
const usingArrow = numbers.filter(number => number > 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment