False Flag ERROR


False Flag Error!!!!

// 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");

ReferenceError: 'book' is undefined '?'


Your class is called Book not book.


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