Declaring a variable with the same name as one of the keys an object in Javascript?

前端 未结 0 1290
不思量自难忘°
不思量自难忘° 2021-01-28 05:34

How to i declare a variable with the same name as one of the keys of an object i javascript?

Example

add(obj){
    let Object.keys(obj)[1] = obj;
    }


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题