how to use loop in node js code example Example: for loop in node js var i; for (i = 0; i < cars.length; i++) { text += cars[i] + "<br>"; }