32..?


#1

// 3 lines required to make harry_potter
var harry_potter = new Object();
harry_potter.pages = 350;
harry_potter.author = "J.K. Rowling";

// A custom constructor for books
function Book (pages, author) {
this.pages = pages;
this.author = author;
}

var the_hobbit = new Book(320,"J.R.R Tolkien");
// Use our new constructor to make the_hobbit in one line

should work. doesn't


#2

@superhacker69,
Try it by using

"J.R.R. Tolkien"

and next time,
please mention the Error / Oops Message you are getting.


#3

I am also having trouble with section 32. Here is the line of code I tried to submit.
var the_hobbit = new Book (320,"J.R.R. Tolkien");
The error appears as "ReferenceError: 'y' is undefined".
Thank you in advance for any feedback.


#4

@textwhiz61365,

Please present the code you are using....


#5

thank you very much sir. AHH..


#6

disregard, found the issue. Thank you for your willingness to assist.


#7

Should be...

// 3 lines required to make harry_potter
var harry_potter = new Object();
harry_potter.pages = 350;
harry_potter.author = "J.K. Rowling";

// A custom constructor for book
function Book (pages, author) {
this.pages = pages;
this.author = author;
}

// Use our new constructor to make the_hobbit in one line
var the_hobbit = new Book(320, "J.R.R. Tolkien");


#8

thank you very much.......................