'how to add a new item inside an object
react I have that problem. I cant add a new item inside an object
const person = {
name:"farhan",
age:"25",
address:"daka"
};
person.push({profession:"job holder"})
Solution 1:[1]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jax-p |