What is an Array? How does it work? Here is a simple answer (and more).
Note: I rail against non-zero indexed based languages here because zero is the modern standard, but even though 0 based indexes for arrays are the norm, there are some languages that don't start at zero that still have specific or rare use:
Fortran (Existed before C, only used in special cases in modern times): INTEGER, DIMENSION(1:5) :: array ! Starts at 1
Lua: (Register Based Scripting Language) myArray = {10, 20, 30} -- myArray[1] is 10
MATLAB/Octave (For data science, mostly replaced by python): array = [10, 20, 30]; % array(1) is 10
Smalltalk (A LISP): array := #(1 2 3). "array at: 1" returns 1
COBOL(Used by banks and insurance companies): 01 TABLE-NAME OCCURS 10 TIMES INDEXED BY I.
ADA (gov use): type Index is range 1 .. 10; type My_Array is array(Index) of Integer;
Another one is "R" - used for data science like MATLAB - but it is mostly replaced by Python, and the "R" example isn't allowed by YouTube due to the angled brackets needed.
Join this channel to get access to perks:
/ @honestduane