Skip to content

Instantly share code, notes, and snippets.

@hhursev
Created December 14, 2015 13:38
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 hhursev/190423cdc4f0bc49511e to your computer and use it in GitHub Desktop.
Save hhursev/190423cdc4f0bc49511e to your computer and use it in GitHub Desktop.
Paradigms
// imperative
let makes = [];
for (i = 0; i < cars.length; i++) {
makes.push(cars[i].make)
}
// declarative
let makes = cars.map((car) => { return car.make })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment