Functions package a sequence of steps under a name so it can be understood and run again. Declaring a function defines the behavior; calling it is what actually executes the body.
function showWelcomeMessage() {
console.log("Welcome to Codington!");
}
showWelcomeMessage();
showWelcomeMessage();Begin by declaring, calling, and tracing small parameter-free functions before adding inputs and outputs in the next module. Good function names describe an action and let a reader understand the larger program without inspecting every detail.