I realized that this code
function(todo) {
if(!todo) { return }
// some stuff here
}
and this code
function(todo) {
if(todo) {
//some stuff here
}
}
gets you the same result. When the function is called, if the todo
argument is truthy, then the “some stuff” gets executed. Is there any diference between these 2 approaches?