diff options
author | Kamil Łopuszański <kam.wopush314@gmail.com> | 2017-10-04 16:15:38 +0200 |
---|---|---|
committer | Kamil Łopuszański <kam.wopush314@gmail.com> | 2017-10-04 16:15:38 +0200 |
commit | 9afd4fd1bd7ea9fb32dd3957c07380d3879da753 (patch) | |
tree | 60b05538bf0c017c629f505822c41beaa78077d7 /ca-es/groovy-ca.html.markdown | |
parent | c7036d6e89852d6ff561f53dcebab2b036d39361 (diff) |
[groovy] small fix in iteration over a map
Diffstat (limited to 'ca-es/groovy-ca.html.markdown')
-rw-r--r-- | ca-es/groovy-ca.html.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ca-es/groovy-ca.html.markdown b/ca-es/groovy-ca.html.markdown index 57674970..f0a9adbe 100644 --- a/ca-es/groovy-ca.html.markdown +++ b/ca-es/groovy-ca.html.markdown @@ -233,10 +233,12 @@ for (i in array) { //Itera per un mapa def map = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy'] -x = 0 +x = "" for ( e in map ) { x += e.value + x += " " } +assert x.equals("Roberto Grails Groovy ") /* Operadors |