I want to trigger a function while calling a particular key stored in Session Storage.
I tried the code given below.
sessionStorage.setItem('user', function myfync{alert("Hi")});
But while using the getItem function it is returned to me as a string and the function does not get executed. Is there a workaround to this that I'm missing?