And this is a factory fuction that creates an object of type personFF by returning an object with the properties geven as parameters
functionpersonFF(name,age){//here age and name can be named anything.//this (name_ and age_) is just a naming convention I used :)return//this returns an object using the object literal.//so the object that we return can have as many properties and methods depending on our //needs.{name,age,//we can add methods and properties here};}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is a constructor that creates an instance of a Person
And this is a factory fuction that creates an object of type personFF by returning an object with the properties geven as parameters