9 Please


#1



https://www.codecademy.com/courses/javascript-beginner-en-NhsaT/2/1?curriculum_id=506324b3a7dffd00020bf661


It is asking if I declared a variable called junk how would I do that and where?
Please
And can you be specific please :slight_smile:

Replace this line with your code. 
var names = ["Cobra", "Madyln", "Jack", "Loyd", "Rachael"];
for (i = 0; i < names.length; i++) {
console.log("I know someone called:" + names[i]);
}


#2

@coreslayer28375,
You could try it with

var junk = ["Cobra", "Madyln", "Jack", "Loyd", "Rachael"];

#3

Now it is saying
Oops, try again. Your code doesn't look quite right.
Can you please explain to me how it isn't right? Thx


#4

Hi in this lesson you should create an array called junk and then print that array


#5

Yes I know that here is my new code
var Junk = ["Cobra", "Madyln", "Jack", "Loyd", "Rachael"];
for (i = 0; i < names.length; i++) {
console.log(Junk)("I know someone called:" + names[i]);
}
Now it is saying did you create a variable called Junk?
What now?


#6

Don't need of the for loop ..... just keep that part of the for loop

console.log(Junk)

#7

That didn't change anything.
Any other ideas?
(Not trying to be aggressive)


#8

should be like that

var junk = ["Cobra", "Madyln", 5, 6];
console.log(junk)

maybe you did it but you put the uppercase J to junk and you should have inside your array 2 string and 2 number


#9

That worked thx man appreciate it :slight_smile:


#10

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.