Get Programming with JavaScript - Listing 5.16

Listing 5.16 - Defining a function with a default argument

const showMessage = (message = "Hello World!") => { console.log(`The message is: ${message}`); }; showMessage("It's full of stars!"); showMessage("Hello to Jason Isaacs"); showMessage();