Advertisement
TZinovieva

Circle Area JS Advanced

Sep 14th, 2023
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function circleArea(argument) {
  2.     if (typeof argument === 'number') {
  3.         console.log(`${(Math.PI * argument * argument).toFixed(2)}`);
  4.     } else {
  5.         console.log(`We can not calculate the circle area, because we receive a ${typeof argument}.`);
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement