-2

... through the console.

Here is a backbone test application.

If I open up the console in Firefox will auto-fill this value:

localStorage.todos-backbone

I get an error as such:

backbone is not defined

which makes me think that it is parsing the - that backbone uses to create the key.

1 Answers1

3

Uhm... hm.

localStorage['todos-backbone'];

Otherwise the - is a minus sign and it's looking for a variable called backbone to subtract from localStorage.todos (which also doesn't exist)

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592