For example, this is how it would be done in Python:
for current in range (start, end):
Question: is this the translation to JavaScript?
for(current = start; current < end; current++){}
For example, this is how it would be done in Python:
for current in range (start, end):
Question: is this the translation to JavaScript?
for(current = start; current < end; current++){}
You should always use "use strict" in your JS code. With "use strict", the code must look like:
for(var current = start; current < end; current++){}
Reference for "use strict": https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
var. That is true, otherwise you'll introduce accidental globals.