Home » HTML » Html miscellaneous » Question
  1. Which of the following is invoked when it is not fired on window object?
    1. getItem()
    2. setItem()
    3. clear()
    4. removeItem()
    5. None of these
Correct Option: A

When removeItem(), clear() and setItem() are invoked the events are fired on window object, which accesses newly stored or removed data, as defined by LocalStorage and sessionStorage attributes, getItem(key) method returns the current value associated with the key.



Your comments will be displayed only after manual approval.