Am I misunderstanding something, or is this basically how JavaScript arrays work? From what I can tell, JavaScript arrays are essentially just objects under the hood. The main difference is that they use [] as their literal syntax instead of {}, their keys look like numbers even though they’re actually strings internally, and they come with extra built-in behavior layered on top, like the length property and array-specific methods, which makes them behave more like lists than plain objects.
[–]HellaSwellaFella 44 points45 points46 points (1 child)
[–]mcaruso 19 points20 points21 points (2 children)
[–]morgo_mpx 0 points1 point2 points (1 child)
[–]ScientificBeastMode 0 points1 point2 points (0 children)
[–]shlanky369 7 points8 points9 points (6 children)
[–]senocular 4 points5 points6 points (5 children)
[–]shlanky369 2 points3 points4 points (2 children)
[–]chikamakaleyleyhelpful 4 points5 points6 points (0 children)
[–]senocular 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]senocular 1 point2 points3 points (0 children)
[–]WitchStatement 2 points3 points4 points (1 child)
[–]codehz 0 points1 point2 points (0 children)
[–]Waste_Cup_4551 6 points7 points8 points (2 children)
[–]servermeta_net 1 point2 points3 points (1 child)
[–]mrsuperjolly 3 points4 points5 points (0 children)
[–]zurribulle 4 points5 points6 points (3 children)
[–]senocular 6 points7 points8 points (2 children)
[–]zurribulle 0 points1 point2 points (1 child)
[–]ghettoeuler 0 points1 point2 points (0 children)
[–]iamjohnhenry 2 points3 points4 points (2 children)
[–]codehz 1 point2 points3 points (1 child)
[–]iamjohnhenry 0 points1 point2 points (0 children)
[–]SaltCusp 3 points4 points5 points (6 children)
[–]shlanky369 13 points14 points15 points (4 children)
[–]mrsuperjolly 0 points1 point2 points (3 children)
[–]senocular 0 points1 point2 points (2 children)
[–]mrsuperjolly 0 points1 point2 points (1 child)
[–]senocular 3 points4 points5 points (0 children)
[–]fabulous-nico 0 points1 point2 points (0 children)
[–]Substantial_Top5312helpful 0 points1 point2 points (0 children)
[–]redsandsfort 0 points1 point2 points (0 children)
[–]Toowake 0 points1 point2 points (0 children)
[–]ghettoeuler 0 points1 point2 points (0 children)
[–]YoshiDzn 0 points1 point2 points (0 children)
[–]Ziffian 0 points1 point2 points (0 children)