Saving/Loading variables

I'm making a game that uses an array to keep track of which levels have been completed, and which haven't. My question is, how do you save the array so that the next time the player plays my game (online), the array is called back into existence and the player doesn't have to do those levels again? Also, while I don't need it in Javascript, it'd be nice since that's what I use. Thanks!

Check this script on the wiki:

http://www.unifycommunity.com/wiki/index.php?title=ArrayPrefs

It'll let you persist your own int, string etc arrays very easily