You have the following code. You discover that the displayGlobalProduct function displays a value of boat. You need to change the function to display a value of car. Which line of code can you use to replace the alert?
i have found this code inside this page: https://stackoverflow.com/questions/3294262/difference-between-window-and-eval-javascript
--------------
var foo = "global";
(function () {
var foo = "local";
alert(eval("foo")); // alerts "local"
alert(window["foo"]); // alerts "global"
})();
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.70-480 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
angela2021
4 years, 5 months ago