JavaScript Developer — Hard
Key points
- The function `foo` returns the value of `y`
- The default value of `y` is `x * 2`
- When `foo(3)` is called, `x` is 3
- Therefore, `y` is calculated as 3 * 2, resulting in 6
Ready to go further?
Related questions
JavaScript Developer — Hard
Key points
Ready to go further?
Related questions