6/7 Log it: The array is displayed vertically?


#1

This is my code
/*jshint multistr:true */
var text = "Your name is Carolin? My name is Carolin, too. \
there are a few people named Carolin around here."
var myName ="Carolin"
var hits = []
for (var i = 0; i < text.length; i++){
if(text[i] === 'C'){
for (var j = i; j < (i + myName.length); j++){
hits.push(text[j]);
}
}
}
if(hits.length === 0) {
console.log("Your name wasn't found!");
} else {
console.log(hits);
}

This what ends up in the console:
[ 'C',
'a',
'r',
'o',
'l',
'i',
'n',
'C',
'a',
'r',
'o',
'l',
'i',
'n',
'C',
'a',
'r',
'o',
'l',
'i',
'n' ]

Why isn't it displayed in a row?


#2

I'm assuming this has to do with your browser. It seems as if you're logging the correct answer so the lesson should pass you. This could have happened if your browser was in windowed mode, or if you're on Google Chrome. (Not to assume that it couldn't happen on other browsers, but I've experienced this on Google chrome once before.)