I am using this piece of code inside a javascript function.
But when I run the application it gives a reference error that local Storage is not defined.
localStorage.setItem(result.key+authAppParams.application , result.key);
Why this occurs?
Why can't I use this inside a function?
Since it is a setItem and all the releated values are inside the method I cannot define the local Storage globally.
How can I avoid this issue and make this work?