Default Parameters

function greet(greeting, name="Anonymous"){
console.log(greeting +", "+ name);
}
greet(); // undefined, Anonymous
greet('Hello'); // Hello, Anonymous
greet('Hello', 'Dady'); // Hello, Dady
// ES5
function greet(cb){
cb();
}
greet(function(){
console.log("completed"); // completed
})
// ES6
function greet(() => console.log("completed")){
cb();
}
greet();