In Javascript, lists are called Arrays (same in most other programming languages), and they are specified using square brackets. Here's an example:
The number that you use to access a particular element is called an index.
The big difference is that in Scratch, the first element is index number one, but in Javascript, it's index number zero.
Here's that same Scratch program, but written in Javascript. When you run it, remember case matters.
|