Skip to content

Instantly share code, notes, and snippets.

@dan-laskowski
Created August 6, 2020 12:39
Show Gist options
  • Save dan-laskowski/8f17706579ebd05a12071778e651f224 to your computer and use it in GitHub Desktop.
Save dan-laskowski/8f17706579ebd05a12071778e651f224 to your computer and use it in GitHub Desktop.
[Additive Inverse] #arrays #math #map #loops
function additiveInverse(arr) {
return arr.map(x => -x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment