This might be an old qustion, but just to keep things updated, there is a forEach method in javascript that works with NodeJS. Here's the link from the docs. And an example:
count = countElements.length;
if (count > 0) {
countElements.forEach(function(countElement){
console.log(countElement);
});
}