From 9c50a9d8da39a03e5aa04ebe5ffa54fb327f940e Mon Sep 17 00:00:00 2001 From: Karthik Nayak Date: Fri, 13 Nov 2015 00:19:05 +0530 Subject: [PATCH] fix error in iota enumeration --- en/02.2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/02.2.md b/en/02.2.md index 1af8894d..61045729 100644 --- a/en/02.2.md +++ b/en/02.2.md @@ -224,7 +224,7 @@ Go has one keyword called `iota`, this keyword is to make `enum`, it begins with x = iota // x == 0 y = iota // y == 1 z = iota // z == 2 - w // If there is no expression after the constants name, it uses the last expression, so it's saying w = iota implicitly. Therefore w == 3, and y and x both can omit "= iota" as well. + w // If there is no expression after the constants name, it uses the last expression, so it's saying w = iota implicitly. Therefore w == 3, and y and z both can omit "= iota" as well. ) const v = iota // once iota meets keyword `const`, it resets to `0`, so v = 0.