quote:
Originally posted by Jonte135
code:
int curWord = 0;
Well, you're doing it a little bit complicated.
If you're planning to use "int" for integer numbers, "float" for floating point numbers, and so on, you'll have to either look at some reference for a thousand times, or "study" all those data types and their keyword (e.g. "int" for integer).
What's easier to use, is the "var" keyword. You can use it for most (if not all) data types:
code:
var VariableNumberOne = "Hello there"; // String
var ThisOnesUndefined; // do not use the "assign" ( "=" ) operator
var ThirdOne = 9999; // Number
var FourthIsFloat = 1.01; // also a Number
var myObject = new Object(); // don't bother yet
var Nothing = null; // never mind either