Javascript examples for Statement:for
For loop with chars as control variable
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w w w . j a va 2 s .c o m for (var i = 'a'; i !== 'z'; i = nextChar(i)) { console.log(i.charCodeAt()); } function nextChar(c) { return String.fromCharCode(c.charCodeAt(0) + 1); } } </script> </head> <body> </body> </html>