what's wrong here? and what is the different if I declared like this
mat.prototype = function discountedMat(){
}
function mat(brick,sand,water) {
this.mat = brick;
this.sand = sand;
this.water = water;
var cal = function(){
return this.mat * this.sand * this.water;
};
}
var material = new mat(44,2,9);
console.log(material.cal());