Skip to content

Instantly share code, notes, and snippets.

@DanShappir
Created November 7, 2019 09:08
Show Gist options
  • Select an option

  • Save DanShappir/4396ee0f60aaba532130bbe9f24dcf21 to your computer and use it in GitHub Desktop.

Select an option

Save DanShappir/4396ee0f60aaba532130bbe9f24dcf21 to your computer and use it in GitHub Desktop.
Double values of items in an array using declarative approach
const doubled = numbers.map(v => 2 * v); // numbers is an array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment