JS Coding Questions Logo
JS Coding Questions
#68🎯 Exercise💻 Code

JavaScript Coding Exercise 68

Advertisement

728x90
javascript
1var currentCity = "NewYork";
2
3var changeCurrentCity = function () {
4
5console.log("Current City:", currentCity);
6
7var currentCity = "Singapore";
8
9console.log("Current City:", currentCity);
10};
11
12changeCurrentCity();

Choose the correct output:

A
NewYork, Singapore
B
NewYork, NewYork
C
undefined, Singapore
D
Singapore, Singapore

Advertisement

Responsive Ad
68of86