This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//created an object TodosList | |
var TodosList = { | |
todos: [],//todos array | |
displayTodos:function() {//method that displays values in array | |
console.log('My Todos:'); | |
if(this.todos.length===0){//check if it's empty | |
console.log('Your array is empty.'); | |
}else {//if it's not empty | |
for(i=0;i<this.todos.length;i++){ | |
//console.log(this.todos[i].todoText); |