Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JavaScript Demo: Standard built-in objects - parseFloat()
- function circumference(r) {
- return parseFloat(r) * 2.0 * Math.PI;
- }
- console.log(circumference(4.567));
- // Expected output: 28.695307297889173
- console.log(circumference('4.567abcdefgh'));
- // Expected output: 28.695307297889173
- console.log(circumference('abcdefgh'));
- // Expected output: NaN
- for more:https://cuty.io/eZpU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement