1. shunsuke227ono

    Posted

    shunsuke227ono
Changes in title
+i++と++iの違い
Changes in tags
Changes in body
Source | HTML | Preview
@@ -0,0 +1,20 @@
+
+### i++は返り値としてインクリメント後の値を返す
+
+```
+ i = 1;
+ j = ++i;
+ (i is 2, j is 2)
+```
+
+### i++は返り値としてインクリメント前の値を返す
+
+```
+ i = 1;
+ j = i++;
+ (i is 2, j is 1)
+```
+
+***
+
+参考: [What is the difference between ++i and i++](http://stackoverflow.com/questions/24853/what-is-the-difference-between-i-and-i)