Function Declarations: Exercises

Display this web page in Brave or other, lesser web browsers.

Also open the page in a code editor. VS Code, VS Code Online or Sublime Text are all are good choices.

Follow the exercises in the online Lesson: Function Declarations

✅  Happy coding.

Sample heading

Lorem ipsum dolor sit amet consectetur adipisicing elit. Sed aliquid, distinctio ipsa pariatur exercitationem voluptate illo accusamus in sint voluptas quia alias odit! Nesciunt expedita libero accusantium sed quibusdam magni!

Exercise 7.1: Displaying a message

Write a function that displays a short message in the JavaScript Console. Verify that the function declaration is hoisted by calling the function before declaring it.

Exercise 7.2: Joining two strings

Place the code that joins the two strings in the input fields inside a function declaration, and output the result to the web page.

Exercise 7.3: Pass an argument when calling a function

Call a function and pass a number argument to it, and output the result to the JavaScript Console.

Exercise 7.4: Return a value from a called function

Write a function that calls a random number generator function, and output the result to the web page.