Skip to content

Instantly share code, notes, and snippets.

@codeBelt
Last active February 6, 2022 17:53
Show Gist options
  • Save codeBelt/87ddcceaaf36720699392f4c50f1ff5e to your computer and use it in GitHub Desktop.
Save codeBelt/87ddcceaaf36720699392f4c50f1ff5e to your computer and use it in GitHub Desktop.
const arrayData = ['a', 'b', 'c', 'd', 'e'];
arrayData[0]; // First element is "a"
arrayData[arrayData.length -1]; // Last element is "e"
// Middle elements
arrayData[1]; // "b"
arrayData[2]; // "c"
arrayData[3]; // "d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment