Is there any difference between

obj = {'foo': 'bar'} 

and

obj = {foo: 'bar'}

I have noticed that you can’t use - in the key when I don’t use the quotes. But does it actually make a difference? If yes, which?

5 Answers
5

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *