October 21, 2019
I love es6!
Today I just learned how to build an object with an dynamic key.
function dynamicKey() { return 'example'; } const example = { [dynamicKey()]: 'value', };