How to store data in cocos creator?

Hi
I could not find anythig in api and documentation page.
How can I store a something in cocos creator?

(in unity3d, sharedprefs is used for it.)

I found it.

var ls = cc.sys.localStorage
ls.setItem("key", 555)

var data = ls.getItem("key")
console.log(data) // prints 555

also there is an example

5 Likes

Wow, Thanks it is really helpful.