We are displaying this object to the console over here. We have a to-do, so what we'd like to do is to check whether the user is an admin. We have a handy function for that over here. When the user is an admin, we want to set that isAdmin flag to true. Otherwise, if the user is not an admin, we don't want to add anything to the object.
One way we could do that is to basically do, if user is an admin -- so if an admin equals true -- we could add a new property to this user object, setting isAdmin equal true. Another way would be to conditionally spread the isAdmin property to this user object.
To do that, instead of using this if statement, do ...isAdmin. If it's true, we are going to spread the object containing isAdmin equal true. Otherwise, we are going to spread an empty object. Basically, spreading an empty object is not going to add anything to this user object, but if the user is an admin, we are going to spread this initial object containing isAdmin equals true.
Now, we can see the result in the console over here. I have this object, which contains the isAdmin equal true. If I change it to false over here so the user is no longer an admin, what we can see here in the console, that the user is not an admin.