todo.js 332 B

1234567891011
  1. const todo = ['Call with Jon', "Return Mom's trimmer", 'Get Insurance', 'Register for wcb', 'Wake up for christmas']
  2. // Delete the 3rd item
  3. todo.splice(2, 1)
  4. // Add a new item onto the end
  5. todo.push('Email Paulo')
  6. // Remove the first item from the list
  7. todo.shift()
  8. console.log(`You have ${todo.length} todos.`)
  9. console.log(todo)