use a variable as key in object javascript code example Example: js variable for key obj { [yourKeyVariable]: someValueArray, }