added initial js file
Added logic to check input
added number validator function