GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing arcade.makecode.com — Array ArrayAn Array is a list of other items that have a basic (primitive) type. An array is a list of items that are numbers, booleans, or strings. Arrays have a length which is the number of items they contain. You get and change the values of items at different places in an array. You find items in an array by knowing their positions. Arrays are flexible, they can grow and shrink in size. You can add and remove items at any place in the array. Create an arrayAn array is created by making a list of items. Here the array automatically becomes an array of numbers because it was created with items that are numbers. You can use different types, like string. If you want to create an array with no items in it yet (empty array), you have to tell what type the array should be. This is because there are no items in it that automatically decide the type. Items in an arrayWhen an item is added to an array it becomes an element of the array. Array elements are found using an index. This is the position in the array of the element, or the element's order in the array. The positions in an array begin with the index of Length of arraysArrays always have a length. The last element of an array has an index that is length of array - 1. Indexes begin with AdvancedArrays are a very useful way to collect and organize information. There are more advanced operations and functions you can use on arrays. Here's an example using insertAt to insert a number into the middle of an array. See also |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |