With this code i want to achieve output name: Gunnar but I get { name: 'Gunnar' }, how do I remove the '' around Gunnar in the output?
let keyName = "name";
let value = "Gunnar";
let person = {
[keyName]: value
};
console.log(person)
I've guess it have something to do with the "value" but i can't figure out how to fix it.
You can overwrite
console.logso it removes"when printing