Created
July 14, 2014 10:22
-
-
Save StaniTr/3e06226352c78961551f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//function calcSircleArea(r) - func with parameter r (radius) | |
function calcCircleArea(r){ | |
//area | |
var area=Math.PI*r*r; | |
return area; | |
//console.log(arguments); --prints arguments of the function | |
} | |
function printArea(){ | |
document.getElementById('print').innerHTML='r = 7 area= '+calcCircleArea(7)+'</br>'+ 'r= 1.5 area ='+calcCircleArea(1.5)+'</br>'+ 'r= 20 area ='+calcCircleArea(20); | |
} | |
window.onload=printArea; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment