'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]

.push() is for arrays. You want to assing value to object like:

person.profession = "job holder"

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