Js Iterate Through Array Python Methods That Only Takes