function Sphere(radius) { this.radius = radius; this.pi = 3.14; this.volume = function() { return Math.pow(this.pi, 3) * 3/4 * this.radius; }; } var football = new Sphere(10); document.body.innerHTML += "<p>Volume: " + football.volume() + "</p>";