Default Parameters in ES6

Default parameters have been a great addition to ES6, and they are fairly easy to understand with this quick walk through.

const myFaveAnime = () => {
console.log("Gintama is my favourite anime");
}
myFaveAnime();
const myFaveAnime = (anime) => {
console.log(`${anime} is my favourite anime`);
}
myFaveAnime("Fairy Tail");
const myFaveAnime = (anime) => {
console.log(`${anime} is my favourite anime`);
}
myFaveAnime();
const myFaveAnime = (anime = "Vinland Saga") => {
console.log(`${anime} is my favourite anime`);
}
myFaveAnime();
const myFaveAnime = (anime = "Vinland Saga") => {
console.log(`${anime} is my favourite anime`);
}
myFaveAnime("Black Clover");