Skip to content

Instantly share code, notes, and snippets.

@adamcameron
Last active December 31, 2015 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adamcameron/7926175 to your computer and use it in GitHub Desktop.
Save adamcameron/7926175 to your computer and use it in GitHub Desktop.
See
<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