var k_as_v = "k_as_v";
obj = {
[k_as_v]:k_as_v,
}
console.log(obj);
Why cant I just keep k_as_v
var k_as_v ="k_as_v";
obj = {
[k_as_v],
}
console.log(obj);
If cant how can i achieve this without re-declaring, any hack !
var k_as_v = "k_as_v";
obj = {
[k_as_v]:k_as_v,
}
console.log(obj);
Why cant I just keep k_as_v
var k_as_v ="k_as_v";
obj = {
[k_as_v],
}
console.log(obj);
If cant how can i achieve this without re-declaring, any hack !
For further actions, you may consider blocking this person and/or reporting abuse
Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.
Mike Young -
Ruben -
Pawani Madushika -
Kartik Mehta -
Top comments (4)
Just remove the square brackets.
{ kasv }
No mate , not working
jsbin.com/nuboloqaqi/edit?js,console
One set of curly brackets too many.
Obj = { kasv }
Thank you, Done !