When accessing a property of an array or object with bracket notation, you will get this error if no property is supplied.
const a = [1, 2, 3]
const b = a[]
// or
const c = { d: 4 }
const d = c[]
Fix: Provide an index argument
To fix the error, provide an index or property:
const a = [1, 2, 3];
const b = a[1];
// or
const c = { d: 4 };
const d = c["d"];