20,741
edits
mNo edit summary |
mNo edit summary |
||
| Line 56: | Line 56: | ||
var waypoints = ["wp1","wp2","wp3","wp4","wp5"]; | var waypoints = ["wp1","wp2","wp3","wp4","wp5"]; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This piece of code is equivalent to creating 5 different variables named "waypoints[n]" with an access index from n=0 to 4 (5 elements in total). | |||
As you can see below, indexing starts at 0. | As you can see below, indexing starts at 0. | ||
The problem is, that this only gives us a list of single waypoints: | The problem is, that this only gives us a list of single waypoints: | ||