Coding Log — January 4th, 2018 — Day 19

Coding Time: Full Day

Here’s what I did today:

Continued Watch & Code

I still don’t think I’m very good at absorbing a lot of information in one day. My brain was clearly not in it after 2 sections. Those 2 sections should’ve taken me half an hour, yet here I am, 10 hours later. I don’t know how to fix this. Maybe more breaks. I’ve spent the whole day in this chair and I’m just tired. I’m disappointed that even when I like something, I still can’t focus on it.

Eugh.

Regardless, I got up to 42% of the course. There’s no point in continuing if I’m just going to be following the tutorial half-heartedly.

Here’s the code we’ve written thus far:

var todoList = {
  todos: [],
  displayTodos: function() {
    if (this.todos.length === 0) {
      console.log('You have nothing left to do today. :)');
    } else {
      console.log("My todos:");
      for (var i = 0; i < this.todos.length; i++) {
        if (this.todos[i].completed === true) {
          console.log('(x)', this.todos[i].todoText);
        } else {
          console.log('( )', this.todos[i].todoText);
        }
      }
    }
  },
  addTodo: function(todoText) {
    this.todos.push({
      todoText: todoText,
      completed: false
    });
    this.displayTodos();
  },
  changeTodo: function(position, todoText) {
    this.todos[position].todoText = todoText;
    this.displayTodos();
  },
  deleteTodo: function(deleteTodo) {
    this.todos.splice(deleteTodo, 1);
    this.displayTodos();
  },
  toggleCompleted: function(position) {
    var todo = this.todos[position];
    todo.completed = !todo.completed;
    this.displayTodos();
  }
};

if (this.todos[i].completed === true) {
      console.log('(x)', this.todos[i].todoText);
} else {
      console.log('( )', this.todos[i].todoText);

}

Tomorrow’s To-Do’s

I really need something to vary this with tomorrow… Hm… Time to buy the Udemy course? Or I’ll go through Kyle Simpson’s video course for Up & Going like I said I would.

Comments can be sent via email.

Subscribe via RSS Feed.