1.

The localStorage and sessionStorage belongs to ___________(a) Window object(b) Element object(c) Hash object(d) DOM objectI have been asked this question in an internship interview.The query is from Client-Side Storage in section Server-Side and Client-Side Scripting of JavaScript

Answer»

Correct choice is (a) WINDOW object

For EXPLANATION: Browsers that implement the “Web Storage” draft specification define two properties on the Window object: localStorage and SESSIONSTORAGE. Local storage and Session storage are the web storage objects. Session storage is destroyed once the user CLOSES the browser whereas, Local storage stores data with no expiration date.



Discussion

No Comment Found

Related InterviewSolutions