js-map-parser icon indicating copy to clipboard operation
js-map-parser copied to clipboard

parsing error when using variable as object key

Open JoshCavallaro opened this issue 6 years ago • 0 comments

for example: var varkey = "mykey"; var myobj = {[varkey]:"myvalue"} this is parsed as an error (unexpected token "["), but is valid javascript

JoshCavallaro avatar Nov 13 '18 03:11 JoshCavallaro