IoT Inspector Interview Question

I had to write a digit parser with error checking in React JS.