Which code statement correctly retrieves and returns an object from localStorage?
A . const retrieveFromLocalStorage = () =>{
return JSON.stringify(window.localStorage.getItem(storageKey));
}
B. const retrieveFromLocalStorage = (storageKey) =>{ return window.localStorage.getItem(storageKey); }
C. const retrieveFromLocalStorage = (storageKey) =>{
return JSON.parse(window.localStorage.getItem(storageKey));
}
D. const retrieveFromLocalStorage = (storageKey) =>{ return window.localStorage[storageKey];
}
Answer: C
Latest JavaScript Developer I Dumps Valid Version with 144 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund