Created
February 22, 2015 16:10
-
-
Save jamc92/d3b9fe225ecff7f71fab to your computer and use it in GitHub Desktop.
JS - Return Function
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Return Function</title> | |
<script> | |
function circleArea(r) { | |
this.r = r; | |
return 3,1416 * (r * r); | |
} | |
</script> | |
</head> | |
<body> | |
<script> | |
var r = r | |
var result = circleArea(8); | |
document.write("El radio del circulo es: " + r + " y su area es: " + result) </script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment