Trying to solve todo.js problem