Dash-case keys

Jordan Harband ljharb at gmail.com
Tue Jan 29 00:00:08 UTC 2019


i think if i can use something unquoted in an object literal, i'd expect to
be able to use it in dot access - ie, `obj.font-size` - and then that
problem arises.

On Mon, Jan 28, 2019 at 3:43 PM Sultan Tarimo <thysultan at gmail.com> wrote:

> The former as the following is equally invalid syntax errors:
>
> const font = 1
> const size = 1
>
> const a = {
>         font-size: 10
> }
> const b = {
>         font+size: 10
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190128/e09a09fb/attachment.html>


More information about the es-discuss mailing list