JSFiddle - React, Tailwind, and code Playground

by Manoj Pal

JavaScript

function mat(brick,sand,water) {
    this.mat = brick;
    this.sand = sand;
    this.water = water;
    
    this.cal = function(){
        return this.mat * this.sand * this.water;
    };
   
}

var material = new mat(44,2,9);
 console.log(material.cal());