Created
February 28, 2019 15:19
-
-
Save boyzoid/b712a31232ad8f033b503a745720d57c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 calcAvg( numeric sold=0, numeric sales=0 ){ | |
if( sales == 0 ){ | |
return 0; | |
} | |
else{ | |
return sold/sales; | |
} | |
} | |
data = { | |
avg = calcAvg, | |
sold = 50000, | |
sales = 25000 | |
}; | |
writeDump( data.avg( argumentCollection = data ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment