Access Array Element

Access elements in an array using an index.

Preview

Code

<script>
let colors = ["Red","Green","Blue"];

console.log(colors[0]);
console.log(colors[2]);
</script>

More JS Arrays Examples (7)