Grow your CSS skills. Land your dream job.

Is there any fundemental differnces between these two constructor functions?

  • # July 26, 2012 at 10:35 pm

    function Person(first, last) {
    this.firstName = first;
    this.lastName = last;
    this.full = function() {
    return this.firstName + ' ' + this.lastName;
    }
    }

    function Person(first, last) {
    return{
    firstName : first,
    lastName : last,
    full : function() {
    return this.firstName + ' ' + this.lastName;
    }
    }
    }
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".