0
Please help
var harry_potter = new Array("Harry Potter " + "Hermione Granger " + "Ronald Weasley " + "Albus Dumbledore " + "Minerva Mc Gonagall " + "Argus Filch " + "Severus Snape " + "Filus Filtwick " + "Pomona Sprout " + "voldemort" + "others") var nums = 0; while (nums < 12) { console.log(harry_potter) nums++ } Whats wrong here? https://code.sololearn.com/cIrn2BAiRaYa/?ref=app https://code.sololearn.com/cIrn2BAiRaYa/?ref=app
1 Answer
+ 3
What do you expect it to do?
You concatenate all the names, creating an array of 1 long string and then output it 12 times.
Please put "Javascript" as tag, not "helpmewiththiscode".