32 what's wrong with the code


#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 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. Tolkein");


#2

I don't know? What is wrong? Is it not working? Do you get an error? I can't help you unless you tell me what to help with.


#3

As @cadecodes stated, you need to post the error (if any) that you're getting, otherwise it's harder for us to help you.

That said, I've noticed that you've spelt the author's name wrong at the bottom (it should be "Tolkien", not "Tolkein") so hopefully that's what the problem was!


#4

Yep, I just tried that, and the typo was the error.


#6

I had the same problem and then I copy-paste the author's name from the instructions and it was ok


#7