Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
|
|
@ -0,0 +1,22 @@
|
|||
import ballerina/io;
|
||||
|
||||
public function main() {
|
||||
// create a new map with four entries
|
||||
map<string> capitals = {
|
||||
"France": "Paris",
|
||||
"Germany": "Berlin",
|
||||
"Russia": "Moscow",
|
||||
"Spain": "Madrid"
|
||||
};
|
||||
|
||||
// iterate through the map and print out the key/value pairs
|
||||
foreach var e in capitals.entries() { io:println(e); }
|
||||
io:println();
|
||||
|
||||
// iterate though the map and print out just the keys
|
||||
foreach var k in capitals.keys() { io:println(k); }
|
||||
io:println();
|
||||
|
||||
// iterate through the map and print out just the values
|
||||
foreach var v in capitals { io:println(v); }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue