mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-04-07 11:26:41 +00:00
Add dynamic object keys notes
This commit is contained in:
parent
cd1fa67960
commit
b2cd836431
1 changed files with 1 additions and 0 deletions
|
@ -560,6 +560,7 @@ let variable = value;
|
||||||
let obj = {
|
let obj = {
|
||||||
property: value,
|
property: value,
|
||||||
variable, // same as variable: variable
|
variable, // same as variable: variable
|
||||||
|
[property]: value // dynamic prop name
|
||||||
|
|
||||||
object: {
|
object: {
|
||||||
...
|
...
|
||||||
|
|
Loading…
Add table
Reference in a new issue