Adding something in loop(Array)
var todos = [
"clean room !", // todos[0]
"brush teeth !", // todos[1]
"exercise !", // todos[2]
"study jacascript", // todos[3]
"eat healthy!" // todos[4]
];
for(var i = 0; i < todos.length; i++) { // .length !!note
//console.log(todos[i]);
todos[i] = todos[i] + "!";
}
Comments
Post a Comment