Определяется тип объектов Dog и создаётся theDog, объект типа Dog:
function Dog(name,breed,color,sex) { this.name=name this.breed=breed this.color=color this.sex=sex } theDog = new Dog("Gabby","Lab","chocolate","girl")
Вызов метода toSource объекта theDog выводит исходный код JavaScript, определяющий этот объект:
theDog.toSource() //возвращает "{name:"Gabby", breed:"Lab", color:"chocolate", sex:"girl"}