OpenNet (Taiwan) interview question

I was asked to implement IsNumber