A copy of the JavaScript functions in the head element:
// sample-9-1-constructor-functions.js
// constructor for Student objects
function Student (firstName, lastName, id)
  {
  this.first = firstName;
  this.last  = lastName;
  this.id    = id;
  this.grade = "";
  }
      
A copy of the JavaScript in the body element:
// sample-9-1-constructor.js
// constructor sample
var fred = new Student("Fred", "Schmidt", 123456);
var mary = new Student("Mary", "Jones", 654321);

document.write("First name: ", fred.first);