Created
February 11, 2021 18:08
-
-
Save trycf/4eb8d9493fcca79baeb2bc5d5a11998a to your computer and use it in GitHub Desktop.
TryCF Gist
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
<cfoutput> | |
<h3>Tag Based Loop</h3> | |
<cfloop index="my_index" from="1" to="5"> | |
The current value of my_index is #my_index#<br> | |
</cfloop> | |
<cfscript> | |
writeOutput("<h3>Script Based Loop</h3>"); | |
cfloop ( index="my_index", from="1", to="5") { | |
writeOutput("The current value of my_index is " & my_index & "<br>"); | |
} | |
writeOutput("<h3>Script Based "For" Loop</h3>"); | |
for (my_index = 1; my_index lte 5; my_index++) { | |
writeOutput("The current value of my_index is " & my_index & "<br>"); | |
} | |
</cfscript> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment