# Day 1 - Advent of Code 2020

So, I decided, against my better judgement to take part in the advent of code. I'm having a blast right now even if day 3 looks a little intimidating for me. For reference I'm not a developer by trade, albeit, I used to code a lot as a kid, I haven't coded properly in upwards of 3+ years.

### Day 1

Day one sets us up with quite a simple challenge: Take some numbers, find two that add up to 2020 then multiply them. Part two, take three, multiply them.

``````for (let i = 0; i < numbers.length; i++) {

for (let j = i+1; j < numbers.length; j++) {

if(numbers[i]+numbers[j] == 2020){
const answer = numbers[i] * numbers[j];
}
}
}``````

For part one, I thought the simplest way would be just to cycle through the options until we found the answer.

``````for (let i = 0; i < numbers.length; i++) {

for (let j = i+1; j < numbers.length; j++) {

for (let k = j+1; k < numbers.length; k++) {

if(numbers[i]+numbers[j]+numbers[k] == 2020){
const answer = numbers[i] * numbers[j] * numbers[k];