IBM
C2180-279 · Question #80
Given the following code: What will the alert(WL.Client.getUserPref('key1')); show?
The correct answer is C. value1, updatedValue1 or null since WL.Client.setUserPref is an asynchronous function and there. See the full explanation below for the reasoning.
Question
Given the following code:
What will the alert(WL.Client.getUserPref('key1')); show?
Exhibit
Options
- AThe alert will not show since WL.Client.setUserPref cannot be called in the for loop since it is an
- BupdatedValue1 since WL.Client.setUserPref({'key1' : 'updatedValue1'}); will replace the value of
- Cvalue1, updatedValue1 or null since WL.Client.setUserPref is an asynchronous function and there
- Dvalue1 since WL.Client.setUserPref('key1', 'updatedValue1'); will fail because
How the community answered
(31 responses)- A6% (2)
- B3% (1)
- C74% (23)
- D16% (5)
Community Discussion
No community discussion yet for this question.
