Replace Numpy Array Elements Javascript Interviewbit Questions