2

When I query localStorage.feature7f1c3c10-048d-4ced-8ab8-b88ac91b59ee in an inspector console I receive the below.

SyntaxError: At least one digit must occur after a decimal point line: 515 message: "At least one digit must occur after a decimal point" stack: "eval@[native code]↵evaluate@[native code]↵_evaluateOn↵_evaluateAndWrap↵evaluate"

Simple question is why?

Frank Phillips
  • 95
  • 1
  • 11

1 Answers1

7

The '-' is illegal in keys in dot notation. You will see that

localStorage['feature7f1c3c10-048d-4ced-8ab8-b88ac91b59ee']

is valid.

More on valid JS identifiers (that can be used as keys without quotes) here.

Community
  • 1
  • 1
Alexander Presber
  • 6,429
  • 2
  • 37
  • 66