Skip to content

Instantly share code, notes, and snippets.

@AdamMescher
Created December 3, 2020 04:18
Show Gist options
  • Save AdamMescher/60a1b57fcb37b8c714e1274407da28a8 to your computer and use it in GitHub Desktop.
Save AdamMescher/60a1b57fcb37b8c714e1274407da28a8 to your computer and use it in GitHub Desktop.
Advent of Code 2020 Day 01 Part 1
for (let i = 0; i < input.length; i++) {
for (let j = 0; j < input.length; j++) {
if (input[i] + input[j] === 2020) {
console.log(`Output: ${input[i]} * ${input[j]} = ${input[i] * input[j]}`)
break
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment