Python Push Pop Array Javascript Function Definition Is Not Allowed