Learn JavaScript
Closure
30.1 - Ex 1
Exercise

Closure

Define a function userDetails. It takes an argument secretPin.

Define a nested function showSecretPin.

Use your knowledge of closures to access the secretPin from the function showSecretPin. Use console.log to show the secretPin.