0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Keep a Function Local

A variable declared inside a function belongs to that function call. Use it before the closing brace because code outside cannot read it.

Example

function greet() { const message = "Hello"; console.log(message); } greet();

Your task

Display Message: Ready to learn from inside showMessage, where message is available. Then call the function.