JSFiddle - React, Tailwind, and code Playground

JavaScript

var screenWidth = 1280;
var screenHeight = 720;

var shapeComtainer = {
    name : "bender",
    offsetX : 100,
    offsetY : 100,
    width : function() { return screenWidth - 2 * this.offsetX },
    height : function() { return screenHeight - 2 * this.offsetY },
};
                         
alert(shapeComtainer.width());