Skip to content

Instantly share code, notes, and snippets.

@jasonleehodges
Created September 11, 2020 15:18
Show Gist options
  • Save jasonleehodges/4c43ca8aa26213a5c189cbddceb9e08f to your computer and use it in GitHub Desktop.
Save jasonleehodges/4c43ca8aa26213a5c189cbddceb9e08f to your computer and use it in GitHub Desktop.
const numbers: number[] = [3, 5, 7, 9, 12];
let accumulator: number = 0;
numbers.forEach((number: number) => {
accumulator += number;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment