Skip to content

Instantly share code, notes, and snippets.

@abuismaeel
abuismaeel / app.js
Created September 14, 2017 09:39
Practical JavaScript by Gordan Zhu Todo app.
//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);