On Loops/Arrays 2, what does the names[i] do?


I just confused on why we have to do console.log("..." + " " + names[i]);


@webjumper49018: That's just being used so you can print a message with a calculate/stored value with it.
Just a nice way to do it using just one console.log() other than using two of them.


sorry im still a tad confused. What would it look like if I used two different statements?


@webjumper49018: I'm not sure how it is on your lession but I'll give you an example.

var anyValue = 100 + 200
console.log("Result is")

This will print in two different lines.
In order to print in one line, you can either do like it was shown to you or simply add a comma, right after last double quotes.

var anyValue = 100 + 200
console.log("Result is", anyValue)

Edit: But follow the instructions that were given to you on your lession!


okay, I think that I understand. I will do this from now on just because it works.


@webjumper49018: I'd suggest to use what the instructions are telling you!
Not following them can block your way too next lessons.