How do u assign new friends/post values to the object inside the function?
It would be like invoking the method inside the object, ensure we pass a parameter as this method (addFriend) has a parameter. In the above code just add the below
newUser.addFriend('John'); console.log(newUser.friends); //This would print the entire friends array console.log(newUser.friends); //To choose to print third element in the friends array
This code would be different if we user Setter and Getter.