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

Exercise prompt

Predict Function Order

A function call runs the body at the exact position where the call appears. After the body finishes, execution continues on the following line.

Example

function showMiddle() { console.log("Middle"); } console.log("First"); showMiddle(); console.log("Last");

The messages appear as First, Middle, and Last.

Your task

Record the prediction Before, Function, After, then add those three actions in the predicted order.

Hint

Declaring a function does not run its body.