How To Turn String Into Int Javascript Substring