4. The following function acts as a constructor to create an Employee object. Use this function to create three new employees. Set the properties and print the employees' names. Add a phone property to this function. < sc_ript ty pe=_text/javascr_ipt_> function Employee(){ var = name; this.getName = function(){ return this.name; } this.setName = function(name){ this.name = name; }; }

Complete chapter 8 exercise 4. Save this page as chapt8ex4.html in your week 5 folder. (Hint: See chapter 8 example 8.16 Pet() function. You do not need to create the other functions - Cat() or Dog() that demo inheritence.)

Back to Assignment Web Page.

Valid XHTML 1.0!

Valid CSS!

W3C XHTML validation page

W3C CSS Validation Page