How to create an object property from a variable value in JavaScript? [duplicate] September 20, 2022 by Tarik There’s the dot notation and the bracket notation myObj[a] = b;