When I assign integer value to localStorage item
localStorage.setItem(\'a\',1)
and check its type
typeof(localStorage.a)
\
My question is it possible to store integer value inside localStorage as I can do for Javascript objects without typecasting?
No.
Storage objects are simple key-value stores, similar to objects, but they stay intact through page loads. The keys can be strings or integers, but the values are always strings. [source]