📅  最后修改于: 2022-03-11 15:03:00.683000             🧑  作者: Mango
// day 16 exceptions - string to integer hackerrank solution javascript
function main() {
const S = readLine();
try{
let num = parseInt(S) || error;
console.log(num);
}
catch(error){
console.log("Bad String");
}
}