Team Stats Project Question

I’m wondering if anyone can help explain if my method of pushing a new player object to the array is OK or if it would be considered bad practice for some reason. I always like to watch the walkthrough after I complete the projects to get insight at others’ problem solving approach. As far as I can tell, both output the end result correctly.

The way I decided to do it was:


The video walkthough, however, completed it like this.

addPlayer(newFirstName, newLastName, newAge){
   let player = {
      firstName: newFirstName,
      lastName: newLastName,
      age: newAge

seems fine to me.
(You just created the object in the argument of the function call instead of before calling .push)