ExitVCEDumpC2180-279IBM Worklight V6.0 Mobile System Administration
Question 16 of 19
0% complete
Q16Single choice
Given the following code:
What will the alert(WL.Client.getUserPref('key1')); show?
A
The alert will not show since WL.Client.setUserPref cannot be called in the for loop since it is an asynchronous function.
B
updatedValue1 since WL.Client.setUserPref({'key1' : 'updatedValue1'}); will replace the value of key1 set in the for loop.
C
value1, updatedValue1 or null since WL.Client.setUserPref is an asynchronous function and there is no guarantee which call, if any,will return first.
D
value1 since WL.Client.setUserPref('key1', 'updatedValue1'); will fail because WL.Client.deleteUserPref ('key1') was notcalled before setting the new value.