I'd expect the following to work, given that the prop expression evaluates
to 'bar', and bar is in context.

var foo = 'bar'
var bar = 'ponyfoo'
var baz = { [foo] }
console.log(baz)
// <- { bar: 'ponyfoo' }

The following works

var foo = 'bar'
var bar = 'ponyfoo'
var baz = { [foo]: bar }
console.log(baz)
// <- { bar: 'ponyfoo' }

Sorry for not being quite spec-speak versed, this is my first message here.
Nico

github <https://github.com/bevacqua> · blog <http://ponyfoo.com/> · twitter
<https://twitter.com/nzgb> · book <http://bevacqua.io/buildfirst> · career
<http://careers.stackoverflow.com/bevacqua> ·about <http://bevacqua.io/>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to