examples/todo/js/modules/footer.js
function() {
			var todos = todosDB.getList();

			var completedCount = 0;
			for (var i = 0, len = todos.length; i < len; i++) {
				if (todos[i].completed) {
					completedCount++;
				}
			}

			var itemsLeft = todos.length - completedCount;

			this.updateItemsLeft(itemsLeft);
			this.updateCompletedButton(completedCount);

		}
function() {
			var todos = todosDB.getList();

			var completedCount = 0;
			for (var i = 0, len = todos.length; i < len; i++) {
				if (todos[i].completed) {
					completedCount++;
				}
			}

			var itemsLeft = todos.length - completedCount;

			this.updateItemsLeft(itemsLeft);
			this.updateCompletedButton(completedCount);

		}
function ( ) { var todos = todosDB . getList ( ) ; var completedCount = 0 ; for ( var i = 0 , len = todos . length ; i < len ; i ++ ) { if ( todos [ i ] . completed ) { completedCount ++ ; } } var itemsLeft = todos . length - completedCount ; this . updateItemsLeft ( itemsLeft ) ; this . updateCompletedButton ( completedCount ) ; }
Updates todo counts based on what is in the todo DB
@returns {void}
Updates todo counts based on what is in the todo DB