Does the new Local Storage stores as String innately or both

Discussion and feedback on Construct 2

Post » Thu Apr 23, 2015 6:05 pm

Does the Local Storage stores only strings ?

It seems I can store numbers as well and I just want to make sure I can rest easy that it does store number as numbers and not doing some voodoo conversion in the background to string.

Thanks.
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Thu Apr 23, 2015 6:14 pm

I believe they can store numbers and strings
"Local Storage preserves the types of values stored. WebStorage would return all values as strings, even if you store a number, which can cause confusing bugs. Local Storage returns a number if you store a number, avoiding issues with unexpected types."
B
86
S
25
G
11
Posts: 652
Reputation: 11,045

Post » Fri Apr 24, 2015 5:45 am

Cool Beans !
B
12
S
3
Posts: 288
Reputation: 1,694


Return to Construct 2 General

Who is online

Users browsing this forum: thewisetree and 10 guests