Numpy Loop Through Array Reactjs Interview