Created
July 17, 2019 04:10
-
-
Save stephenquan/d46b30d122efd12ac81c9a90c8583f0a to your computer and use it in GitHub Desktop.
AppStudio_20190717_ForOf.qml
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
import QtQuick 2.12 | |
import QtQuick.Controls 2.5 | |
Item { | |
Button { | |
text: qsTr("Run For Of Sample") | |
onClicked: { | |
let census = [ | |
{ country: "France", population: 66.99 }, | |
{ country: "Australia", population: 24.6 }, | |
{ country: "United States", population: 327.2 } | |
] | |
for ( let item of census ) { | |
console.log( item.country, item.population ) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment