Hey there, I've been running into a bit of an issue with my basic javascript skills:
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 isn't functioning properly, however the second one is. As someone relatively new to javascript, I can't figure out why the length property is showing as undefined. Any insight would be greatly appreciated!