Array Indexing Starts at Zero
About this video
Check out this video I made with revid.ai
Try the AI TikTok Video Generator
Create your own version in minutes
Video Transcript
Full text from the video
A little bit about Arrays The elements in an array are numbered. his numbering starts
from 0, not 1. For example, in this array, 20 is at position
1. And 10 is at position 0. his usually throws new programmers
for a spin. Starting at 0 makes all kinds of array-based code easier to write,
so programmers have stuck with it. Almost every programming language you use will number array
elements starting at 0. You’ll soon get used to it.
he position of an element is called its index. So instead of saying, “20 is
at position 1,” the correct terminology is, “20 is at index 1.” I’ll use index
240,909+ Short Videos
Created By Over 14,258+ Creators
Whether you're sharing personal experiences, teaching moments, or entertainment - we help you tell stories that go viral.