<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym18_1_1459174815143_3216">Look at that code:</div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216">var i:Int = 0</div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216">for i in (0..100)</div><div id="yui_3_16_0_ym18_1_1459174815143_3216">{</div><div id="yui_3_16_0_ym18_1_1459174815143_3216"> ///...</div><div id="yui_3_16_0_ym18_1_1459174815143_3216" dir="ltr"> if (i == 50)<br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216" dir="ltr"> {<br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216" dir="ltr"> break</div><div id="yui_3_16_0_ym18_1_1459174815143_3216" dir="ltr"> } <br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216">}<br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216">print("i=\(i)")</div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216">What is the value of i ?? Please remove this nonsense from the language unless you are happy to see it job interview questions in future :) </div><div id="yui_3_16_0_ym18_1_1459174815143_3216">My suggestion is to use the variable i in the loop instead of making hidden init of another "i" for the loop. </div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216">Everything that is hidden = evil. It is not saving time but creating bugs. Code should be clear and understandable from first view...</div><div id="yui_3_16_0_ym18_1_1459174815143_3216"><br></div><div id="yui_3_16_0_ym18_1_1459174815143_3216"> </div></div></body></html>