Javascript Input Type Checkbox Reactjs Interview