I'm having some trouble with some basic javascript:
function tank(){
this.width = 50;
this.length = 70;
}
function Person(job) {
this.job = job;
this.married = true;
}
var tank1 = tank();
console.log(tank1.length); //returns: Uncaught TypeError: Cannot read property 'length' of undefined
var gabby = new Person("student");
console.log(gabby.married); //returns: true
The first console.log does not work, but the second console.log works. I'm a javascript beginner and I'm at a loss as to why the length property is undefined. Any help?