I have a question that has been really bugging me for quite a while and I cannot seem to find any resources that cover the topic. How can property names in JavaScript be string literals or numeric literals?

```
var obj = {
    "bar": "foobar",
    "foo": function() { return bar; }
}

```

This topic has bugged me ever since I learned about it a few years ago. I don't know where to get more in-depth information or what this is even called. I not confused on how this is set up as I know that a new object is being creating with members, bar & foo and then its assigned to the obj variable.

You cannot create a variable like var "bar" = "foobar"; because you'll get a syntax error. How is it valid for object literals? Any help on this would be very much appreciated.