Can someone help me with this?


var names=["ram","tom","uday","idar","queen"];
for (var i=0; i<4; i++);{
console.log( "I know someone called" + " " + names[i]);

This is showing error


Try removing the ";" between the conditions of the "for" loop and the brackets. Also, consider how strict inequalities affect your bounds if you intend for all of the names to be included.


in your coding the array string length is more than four so use a number that is more than 4 i.e inside the loop it should be (var i=0; i<5; i++) then remove the semi colon before you print out


var names =["Lora","Angie","Heather","Jannie","Annie"];
for(var a = 0; a < names.length; a++){
console.log("I know someone called " + names[a]);
Here this will run.