I am studying Backbone.js through the example todomvc application from here: http://todomvc.com/architecture-examples/backbone/
And I'm sort of stuck in the app-view.js part here: https://github.com/tastejs/todomvc/blob/gh-pages/architecture-examples/backbone/js/views/app-view.js
Here's the snippet of the code:
// Add a single todo item to the list by creating a view for it, and
// appending its element to the `<ul>`.
addOne: function (todo) {
var view = new app.TodoView({ model: todo });
this.$list.append(view.render().el);
},
Where did the 'todo' variable comes from on the function 'addOne'? I searched the whole project files and so far didn't find any specific function that specifies or initialize the 'todo' variable. I tried to read the Backbone.js and Underscore.js docs on their website and so far haven't find the explanation.