1.object review


var james = {
job = "programmer",
married = false
// add properties to this object!


function Person(job, married) {
this.job = job;
this.married = married;

new gabby= Person ("student", true)

Its saying syntax prblm!!


when you want to create a new instance of your object, the new keyword is required. It seems you have it, but before gaby, it should be before Person


2 posts were split to a new topic: 1. object review


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.