index.tsx233 chars5 lines
In this script, we first declare the radius of the sphere as a variable. We then use the formula for the surface area of a sphere, which is 4 * π * r^2
, to calculate the surface area of our sphere. Finally, we log the result to the console using console.log()
.
gistlibby LogSnag