does anyone know how to enumerate an array in javascript?

so for example:

[9,8,7,6] becomes

[ [1, 9], [2, 8], [3, 7], [4, 6] ]

@famiheart I managed to do it!

but unfortunately no - it's organized all weirdly ---- technically there's a more efficient alternative but im being lazy rn.

Follow

@andre oh oke, i'm glad it worked tho!!! als what is this cute little man in your pfp

@famiheart this lil baby is from a fanmade music video by AIMKID!

s'in my bio!

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!