|
|
|
|
|
by david-gpu
947 days ago
|
|
A variable is a box where you can store a certain type of an object. For example, you can have a box with the right size and shape to store toy cars. At one point the variable (box) may contain a red toy car, and at another point it may contain a blue toy car. If you try to put a banana in there it won't fit because it has the wrong shape for that. We say that the type of the variable (the box) doesn't match the object. The analogy can be extended to talk about null values (empty boxes), arrays (boxes with slots for multiple objects), etc. |
|
Next level of difficulty for newbies is arrays: understanding expressions to set and get values in an array; variables that hold indexes; non-numeric indexes; each of these is a potential huge stumbling block for newbies. And remember, these are just basic programming skills. Things get much harder from there.
The concepts of data manipulation, let alone the mechanics, are difficult for many newbies. Some never get past that point.