I found this article a bit verbose (maybe because I'm already familiar with the topic) and yet missing three "key" (ah ah) points:
- one can get the keys of an object by using Object.keys or a for-in loop and notice that keys are always strings, even when using arrays.
- the object definition syntax [1] is set to define property strings by the standard (and symbols). You can (and probably should) experiment, but the spec will tell you what happens anyway with 100% certainty (except for implementation bugs, but that's not what we are looking for).
- the definitive answer to "what kind of value an object key can be in Javascript?" is given by the section "The Object Type" of the ECMAScript standard [2]:
> Properties are identified using key values. A property key value is either an ECMAScript String value or a Symbol value. All String and Symbol values, including the empty String, are valid as property keys. A property name is a property key that is a String value.
Experimentation helps anchoring things in memory and building intuition, as well as getting into things. Inviting people to experiment by themselves and not blindly trust what they read is a fantastic advice. I do experiment a lot myself. However, experimentation is not the best way to "prove" things (contrary to what the article states). Definitive answers should be found in specifications and documentations (or implementation sources). No amount of experimentation will be enough to convince me of "See? I did this this and this, and it's always strings".
The article is well written, the same thing with these references to the spec would make it strong and irrefutable.
[1] https://tc39.es/ecma262/#sec-object-initializer-static-seman...
[2] https://tc39.es/ecma262/#sec-object-type