I have loaded jquery and I have an array (object) containing strings like so:
window.stack = [
"header",
"nav",
".content",
"footer"
];
When I run this through a loop using jquery's each() function and try to get each of my strings back again like this:
$.each(window.stack,function(){
var h = this;
console.log(h);
})
...I get this:
String [ "h", "e", "a", "d", "e", "r" ]
String [ "n", "a", "v" ]
String [ ".", "c", "o", "n", "t", "e", "n", "t" ]
String [ "f", "o", "o", "t", "e", "r" ]
Why don't I just get:
header
nav
.content
footer
?