I keep seeing a lower case i in scripts. I apologize if this is a trivial question but I have to ask: what does that lowercase i mean?
And if there is any case of source for learning Syntax things like that I would love a link.
I keep seeing a lower case i in scripts. I apologize if this is a trivial question but I have to ask: what does that lowercase i mean?
And if there is any case of source for learning Syntax things like that I would love a link.
I assume you are referring to something like this:
for(i = 0; i < someNumber; i++)
{
//do something
}
"i" is just a variable, it is customary to call it "i" for "increment" or "int" but it can be anything. In that above code it just means:
As long as i, which starts at 0 is less than someNumber (another variable) keep firing the encapsulated code, And when it reaches the "}", end of encapsulation, increment "i" by 1 and repeat... Which is a for loop.
Hope that helps
==
Nothing really, it's generally just used as a basic index/count variable from languages such as C, and moved into newer languages - very often used in for loops:
for (int i = 0; i < 10; ++i)
{
//do something using i
}
Generally (for js/c#), you should always use camel case for all variables, which is lower case for the first letter, then uppercase for the first letter in every word in the name afterwards
e.g.:
i myVariable myOtherVariable