Javascript Array Foreach Function Example In Python