aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlformat/data/forOf.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlformat/data/forOf.qml')
-rw-r--r--tests/auto/qml/qmlformat/data/forOf.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/data/forOf.qml b/tests/auto/qml/qmlformat/data/forOf.qml
new file mode 100644
index 0000000000..0c3be0d2a2
--- /dev/null
+++ b/tests/auto/qml/qmlformat/data/forOf.qml
@@ -0,0 +1,12 @@
+import QtQml 2.0
+
+QtObject {
+ Component.onCompleted: {
+ var list = [[1,2],[3,4],[5,6]];
+
+ for (const [x,y] of list)
+ console.log("X: "+x+"; Y: "+y);
+ for (let [x,y] of list)
+ console.log("X: "+x+"; Y: "+y);
+ }
+}