Why are back ticks for object properties invalid syntax? For example, this is valid:
const test = {
"test1": "test2"
}
So why can’t it have back ticks instead?
const test = {
`test1`: "test2"
}
//throws unexpected token error
It would be really helpful if back ticks could be used like this, but we can’t. Is there a simple alternative, or maybe this works in some browsers?