Find character at specified position using charAt method, also check input value is number or not using Number.isInteger() and parseInt() method.
Note: index starts from 0.