Passing a string as first arguement in a constructor? HELP!


Oops, try again.
Make sure that the_hobbit's author is J.R.R. Tolkien by passing it as the first argument to the Book constructor.

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

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

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


Hi the name of the author..

"J.R.R. Tolkein"

it should be J.R.R. Tolkien


OMG , i was stuck for a while for a silly spelling mistake..thank you @wizmarco :smiley: