Advertisement
f0f077

Untitled

Jan 16th, 2024
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.39 KB | Source Code | 0 0
  1. JavaScript Demo: Standard built-in objects - parseFloat()
  2. function circumference(r) {
  3.   return parseFloat(r) * 2.0 * Math.PI;
  4. }
  5.  
  6. console.log(circumference(4.567));
  7. // Expected output: 28.695307297889173
  8.  
  9. console.log(circumference('4.567abcdefgh'));
  10. // Expected output: 28.695307297889173
  11.  
  12. console.log(circumference('abcdefgh'));
  13. // Expected output: NaN
  14. for more:https://cuty.io/eZpU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement