Am I doing something wrong here? I have an array of tags, and when I do a jQuery each() on the array it doesn't go into the each() I did have an alert in the each but nothing happens. I have checked my error log console and there are no errors. So, what am I doing wrong?
var tags = new Array();
tags["video-games"] = "Video Games";
tags["sports"] = "Sports";
tags["movies"] = "Movies";
tags["board-games"] = "Board Games";
tags["news"] = "News";
tags["television"] = "Television";
tags["computers"] = "Computers";
tags["opinions"] = "Opinions";
tags["reviews"] = "Reviews";
function updateTags(){
console.log(tags);
$("div.tags > div > span:first-child").nextAll().remove();
$.each(tags, function(key, val){
$("div.tags > div").append("<span><a class='tag' href='/tags/" + key + "'>" + val + "</a></span>");
});
}
updateTags();
Array[]likeObject {}.