array in javascript and compare with python