ronald Posted February 26, 2015 Share Posted February 26, 2015 hello, i think i got it all right, but it wont log. ------------------------------------------------ function Person(name,age) { this.name = name; this.age = age; this.species = "Homo Sapiens"; } var sally = Person ("Sally Bowles",39); var holden = Person ("Holden Caulfield",16); console.log("sally's species is " + sally.species + " and she is " + sally.age); console.log("holden's species is " + holden.species + " and he is " + holden.age); Link to comment Share on other sites More sharing options...
davej Posted February 26, 2015 Share Posted February 26, 2015 var sally = new Person ("Sally Bowles",39); Link to comment Share on other sites More sharing options...
ronald Posted February 26, 2015 Author Share Posted February 26, 2015 new, was the magic word indeed. thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now