32. Customizing Constructors - is there a mistake?


Is it necessary to end function Book with ";"?

Anyway, thank's for the course!


If you define the Book function as a so-called named-Function

function Book() { }

you will not use an ending-semi-colon-;.

But if you define the Book =function= using a so-called anonymous function via a variable

var Book = function() { };

you will use an ending-semi-colon-;
as it is an End-of-Statement indicator,
and the statement being the variable definition.

= http://stackoverflow.com/questions/336859/var-functionname-function-vs-function-functionname?rq=1



We won't use Book as a variable name if convention is to apply, unless Book is a custom object constructor. Just saying.