diff --git a/data/en/cfloop.json b/data/en/cfloop.json
index ff1e77269..c8adbd09d 100644
--- a/data/en/cfloop.json
+++ b/data/en/cfloop.json
@@ -51,7 +51,7 @@
{
"title": "Loop Over an Array (Script Syntax)",
"description": "Array Loop",
- "code": "myArray = [\"a\", \"b\", \"c\"];\n// For Loop By index for CF9.0.0 and lower \nfor (i = 1; i <= arrayLen(myArray); i++) {\n writeOutput(myArray[i]);\n}\n// By For In CF9.0.1+ \nfor (currentIndex in myArray) {\n writeOutput(currentIndex);\n}\n// By arrayEach() member function CF11+\nmyArray.each(function(element, index) {\n writeOutput(element & \" : \" & index);\n});",
+ "code": "myArray = [\"a\", \"b\", \"c\"];\n// For Loop By index for CF9.0.0 and lower \nfor (i = 1; i <= arrayLen(myArray); i++) {\n writeOutput(myArray[i]);\n}\n// By For In CF9.0.1+ \nfor (currentIndex in myArray) {\n writeOutput(currentIndex);\n}\n// By arrayEach() member function CF11+\nmyArray.each(function(element, index) {\n writeOutput(element & \" : \" & index);\n});\n// loop with index Lucee5+\nloop collection=cars index=\"i\" value=\"value\" {\n writeOutput(i & \" : \" & value);\n}",
"result": ""
},
{
@@ -63,7 +63,7 @@
{
"title": "Loop over a Struct (Script Syntax)",
"description": "Struct Loop",
- "code": "myStruct = {name: \"Tony\", state: \"Florida\"}; \r\n // By struct \r\n for (currentKey in myStruct) { \r\n writeOutput(\"
#currentKey# : #myStruct[currentKey]#\"); \r\n } \r\n // By structEach() \r\n myStruct.each(function(key, value) { \r\n writeOutput(\"#key# : #value#\"); \r\n }); \r\n ",
+ "code": "myStruct = {name: \"Tony\", state: \"Florida\"}; \r\n // By struct \r\n for (currentKey in myStruct) { \r\n writeOutput(\"#currentKey# : #myStruct[currentKey]#\"); \r\n } \r\n // By structEach() \r\n myStruct.each(function(key, value) { \r\n writeOutput(\"#key# : #value#\"); \r\n }); \r\n // loop with index Lucee5+\nloop collection=myStruct key=\"key\" value=\"value\" {\n writeOutput(key & \" : \" & value);\n}",
"result": ""
},
{
diff --git a/guides/en/for.md b/guides/en/for.md
index 871c39c3f..32eb2e9df 100644
--- a/guides/en/for.md
+++ b/guides/en/for.md
@@ -24,6 +24,13 @@ The above would output `321`
The above outputs `AB`
+Using `loop` you can loop over the key and values (Lucee5+)
+
+ loop collection=st key="key" value="value" {
+ writeOutput(key & " " & value);
+ }
+
+
### For In Loop (over an array) CF9.0.1+
cars = ["Ford","Dodge"];
@@ -35,7 +42,13 @@ The above example would output `FordDodge`
For in support for native Java arrays was added in CF10+
-### For In Loop (over a list) CF10+
+Using `loop` you can track the index and the value (Lucee5+)
+
+ loop collection=cars index="i" value="value" {
+ writeOutput("#i#: #value#");
+ }
+
+### For In Loop (over a list) CF10+ Lucee5+
fruits = "apple,orange,banana";
for (fruit in fruits) {
@@ -44,7 +57,7 @@ For in support for native Java arrays was added in CF10+
The above example would output `appleorangebanana`
-### For In Loop (over a query) CF10+
+### For In Loop (over a query) CF10+ Lucee5+
query = queryNew("name", "varchar", [
["apple"],
@@ -56,7 +69,7 @@ The above example would output `appleorangebanana`
writeOutput("#query.currentRow# - #row.name#
");
}
-### Query Loop (with grouping) CF10+
+### Query Loop (with grouping) CF10+ Lucee5+
q = queryNew("pk,fk,data", "integer,integer,varchar", [
[1, 10, "aa"],