nerdexam
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

C2180-279 question #80 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)
  • A
    6% (2)
  • B
    3% (1)
  • C
    74% (23)
  • D
    16% (5)

Community Discussion

No community discussion yet for this question.

Full C2180-279 Practice