Question: I'm a total JS noobie, and I'm trying to make it so that after one input is entered all of the numbers between 0 and that input are added up, including the input. Here is the basic pseudo code I'm trying to accomplish but i can't figure it out?

```
get count from user

loop up to count{

     add current number to sum

}

display sum

display breakline

loop up to count with a different loop type{

    add current number to sum

}

display sum

```

Answer: 
You could try something like this:

```
// input would be the number that the user will enter
var input = 10;

// the starting number is 0.
var temp = 0;

// the sum.
var sum = 0;

// while the temp would be less or equal to the input,
// then we will add the temp to the sum and we increase it by 1.
// This way, when temp would be equal to imput+1, the statement in 
// the while loop would be false, and the statements in the while loop 
// wouldn't be executed. At this moment, the sum would hold the sum of 
// the integers numbers in the range [0,input].
while(temp<=input)
{
    sum+=temp;
    temp++;
}

```

As for the part of displaying is totally depends on where you want to display the result.
If you want to display it on the console.

```
console.log(sum);

```

If you want to display it on an alert box.

```
alert(sum);

```

etc.
```
var sum = 0;
var input = getCountFromUser(); //However you do it.
for (var j = 1; j <= input; j++) {
  sum += j;
}

```

Or, somewhat shorter:

```
var sum = 0, input = getCountFromUser(), j = 1;
for (; j <= input;) {
  sum += j++;
}

```