Javascript For Loop With Array Python