Javascript Create Map From Array Javascript Length Method Js