Last active
December 31, 2015 03:18
-
-
Save adamcameron/7926175 to your computer and use it in GitHub Desktop.
See
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
<cfscript> | |
testNumbers = [ | |
"0", "0.0", "0.00", "0.000", "0.001", | |
"0.1", "0.10", "0.100", "0.101", | |
"0.11", "0.110", "0.111" | |
]; | |
function formatter(n){ | |
var formattedN = n; | |
// where indicated ;-) | |
return formattedN; | |
} | |
for (testNumber in testNumbers){ | |
writeOutput("#testNumber#: #formatter(testNumber)#<br>"); | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment