function makePerson(fname, lname, age, gender) {
    return {
        firstName: fname,
        lastName: lname,
        age: age,
        gender: gender,
        toString: function() {
            return this.firstname + ' ' + this.lastname ;
        }
    };
}
/**
 * 2. People of age
 *
 * Write a function that checks if an array of person contains only people of age (with age 18 or greater)
 * Use only array methods and no regular loops (for, while)
 * */
2. People of age
Write a function that checks if an array of person contains only people of age (with age 18 or greater)
Use only array methods and no regular loops (for, while)
2 . People of age Write a function that checks if an array of person contains only people of age ( with age 18 or greater ) Use only array methods and no regular loops ( for while )
function makePerson(fname, lname, age, gender) {
    return {
        firstName: fname,
        lastName: lname,
        age: age,
        gender: gender,
        toString: function() {
            return this.firstname + ' ' + this.lastname ;
        }
    };
}
function makePerson ( fname , lname , age , gender ) { return { firstName : fname , lastName : lname , age : age , gender : gender , toString : function ( ) { return this . firstname + ' ' + this . lastname ; } } ; }
2.
2 .