OK, but my use of the variable name 'array' was just a generic example - I wasn't suggesting you use it. Always use descriptive names that tell people what the role of the variable or method or class...
Type: Posts; User: dlorde
OK, but my use of the variable name 'array' was just a generic example - I wasn't suggesting you use it. Always use descriptive names that tell people what the role of the variable or method or class...
A magic number is a numeric literal placed directly in your code, and should be avoided. Far better to use a well named variable initialized with that value. In your code, the magic numbers are the...
So is it fixed, or do you still get errors?
Incidentally, when looping through arrays, don't use 'magic numbers' to hard-code the length, use array.length. This way, you can't put in the wrong...