Last updated 2 years ago
Was this helpful?
JS ⟩ object ⟩ built-in ⟩ Array ⟩ access ⟩ element index ⟩ is string❗
⭐ the type of element index is String, not Number❗
replit:array index is of type 'string'
let obj = { }; let arr = [1,2,3]; obj["1"] = 'one'; let sum = 0; for (
✅ element index is accessed throught bracket notation [].
Guides ⟩ Arrays ⟩ Accessing and modifying array items ⭐️