title: How is it best to add properties to an object literal in JS?
body: <p>I was learning JS and came across two ways to add properties to object literal. The first is straightforward: <code>let person ={name:"Ben", age:5}</code>. The second way is <code>let person ={}; person.name="Ben"; person.age=5</code>. The question is Is the second way of adding new properties is acceptable and does it have some, maybe, performance issues?  </p>