Last active
January 13, 2016 19:49
-
-
Save ddeveloperr/a50fe81a06e97d1e8645 to your computer and use it in GitHub Desktop.
JavaScript allows you to place functions anywhere in your file
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
// WHY JavaScript allows you to place functions anywhere in your file | |
// Link to my blog: https://ddeveloperrblog.wordpress.com/2016/01/13/why-javascript-allows-you-to-place-functions-anywhere-in-your-file/ | |
var radius = 9; | |
var myCircleArea = circleArea(radius); | |
console.log(myCircleArea); | |
function circleArea(r) { | |
var a = Math.PI * r * r; | |
return a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment