1.

Which of the following returns a number of value pairs?(a) storage.key(n)(b) storage.length(c) storage.setItem(key,value)(d) storage.clear()I had been asked this question in class test.This intriguing question originated from Web Storage in division HTML Markup, Forms, Video, Audio & Other Multimedia of HTML

Answer»

The correct option is (b) storage.length

Explanation: storage.length returns number of value PAIRS that are CURRENTLY present in the LIST, storage.key(n) returns name of NTH key from the list, storagesetItem(key,value) sets the value which is identified by key to value, storage.clear() empties the list which is associated with VALUES.



Discussion

No Comment Found

Related InterviewSolutions