Javascript Map Array To New Array Python Methods