Python Push Pop Array Javascript Function Parameters