summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKamil Łopuszański <kam.wopush314@gmail.com>2017-10-04 16:15:38 +0200
committerKamil Łopuszański <kam.wopush314@gmail.com>2017-10-04 16:15:38 +0200
commit9afd4fd1bd7ea9fb32dd3957c07380d3879da753 (patch)
tree60b05538bf0c017c629f505822c41beaa78077d7
parentc7036d6e89852d6ff561f53dcebab2b036d39361 (diff)
[groovy] small fix in iteration over a map
-rw-r--r--ca-es/groovy-ca.html.markdown4
-rw-r--r--es-es/groovy-es.html.markdown4
-rw-r--r--groovy.html.markdown4
-rw-r--r--pt-br/groovy-pt.html.markdown4
-rw-r--r--zh-cn/groovy-cn.html.markdown4
5 files changed, 15 insertions, 5 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
diff --git a/es-es/groovy-es.html.markdown b/es-es/groovy-es.html.markdown
index 799fc609..262d5e6a 100644
--- a/es-es/groovy-es.html.markdown
+++ b/es-es/groovy-es.html.markdown
@@ -232,10 +232,12 @@ for (i in array) {
// Iterando sobre 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 ")
/*
Operadores
diff --git a/groovy.html.markdown b/groovy.html.markdown
index a3a45757..efbb2b32 100644
--- a/groovy.html.markdown
+++ b/groovy.html.markdown
@@ -230,10 +230,12 @@ for (i in array) {
//Iterate over a map
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 ")
/*
Operators
diff --git a/pt-br/groovy-pt.html.markdown b/pt-br/groovy-pt.html.markdown
index 25e123c0..aed23df1 100644
--- a/pt-br/groovy-pt.html.markdown
+++ b/pt-br/groovy-pt.html.markdown
@@ -226,10 +226,12 @@ for (i in array) {
//Itera sobre um 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 ")
/*
Operadores
diff --git a/zh-cn/groovy-cn.html.markdown b/zh-cn/groovy-cn.html.markdown
index 562a0284..0e7a020c 100644
--- a/zh-cn/groovy-cn.html.markdown
+++ b/zh-cn/groovy-cn.html.markdown
@@ -219,10 +219,12 @@ for (i in array) {
//遍历映射
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 ")
/*
运算符