Lab 3 - variables and fuctions

Lab 3 objective

In this assignment you will use objects and functions, including a constructor function.
Put all of these functions in a single JavaScript file.

Book constructor

Write a constructor function named Book.
Accept the following parameters and save them as the value for the corresponding properity.

ItemParameterproperty
Titletitle_parmtitle
Authorauthor_parmauthor
© datedate_parmdate
Publisherpublisher_parmpublisher
Priceprice_parmprice

add_isbn function

Write a function named add_isbn.
This function accepts the following two parameters.
Put the isbn_parm value in the isbn property of the object.

ItemParameterproperty
Book objectbook_object-
ISBNisbn_parmisbn

write_book function

Write a function named write_book.
This function accepts one parameter, which is a reference to a Book object.
It should write each available parameter from the Book object into your web page in a nice format, giving the property name and the property value.

build function

Write a function named build.
This function will contain the data for our class text book.
It will call the other three functions.

page

Build a page named lab3.html

Put a link in your index page to your new page. Also, put a link from this page back to your index page.

Include the file conatining the JavaScript functions in the head of a web page.
Call the build function from the body of the web page.