Returning the position of a number in an array

I have an array of numbers say

let numbers = [4,7,2,0,9];

I want the numbers array to be mapped based on the size of the number in the array and return its position. I need the output to look like this

numbers = [3,4,2,1,5];

thank you

Leave a Comment