I have some jquery code which I'm trying to re-write into basic javascript.
The problem is I have this multidimensional array and I'm not sure how I would write a for loop for this?
$.each(wordcount, function(w, i) {
if (i > 1) {
constrain++;
if (constrain <= 2) {
topwords.push({
'word': w,
'freq': i
});
}
}
});