DEV Community

loading...

Weird Javascript?

pracoon profile image Prasham Ashesh ・1 min read

const a = [1]
a[3] = 3
console.log(a.length);

//What do you expect the output to be?

Discussion (1)

Collapse
pracoon profile image
Forem Open with the Forem app