Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
/*
Create a function named surfaceAreaOfSphere that calculates the surface area of the Sphere using the following formula: 4 * PI * r**2; the function MUST reuse the areaOfCircle function below
*/
// areaOfCirle function; do not modify
function areaOfCircle(radius){
  return Math.PI * (radius**2)
}
function surfaceAreaOfSphere(radius){
  // Add your code here
}
const sphereSurfaceArea = surfaceAreaOfSphere(10)
console.log(`surface area of a sphere ${sphereSurfaceArea}`)
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x