Codington
0 of 8 problems solved • 0%

Exercise prompt

Declare a Function

A function groups instructions into a reusable action.

Example

function showWelcome() { console.log("Welcome"); } showWelcome(); // Output: // Welcome
  • function showWelcome() { ... } prepares the function without running it.
  • The empty () declares no parameters.
  • showWelcome() calls the function. Each call runs its body and displays Welcome.

Your task

Complete showGreeting so calling it displays Hello from a function.