Review the following code:
let x = 10; let y = 20; function test(y) { console.log(y); } test(x);
What will be displayed in the console as a result of its execution?
"y"
20
10
- Nothing, because the function expects the
y
variable to be passed and receivesx
instead.
More Questions: JavaScript Essentials 1 – JSE1: Module 5 Test
Please login or Register to submit your answer