Functions

Parameters Beat Nearby Values

Parameters Beat Nearby Values

A parameter is the input for the current function call. If a function uses a separate outer variable instead, every call can accidentally calculate from the same value.

Your task: Fix doubleSession so it doubles the minutes it receives. The provided call should store and log the doubled value for 12.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Parameters Beat Nearby Values

A parameter is the input for the current function call. If a function uses a separate outer variable instead, every call can accidentally calculate from the same value.

Your task: Fix doubleSession so it doubles the minutes it receives. The provided call should store and log the doubled value for 12.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Console

Run code to see output.