Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let inp = gets();
- let resultString = '';
- let resultInt = 0;
- if(isNaN(inp)){
- for(let i = inp.length - 1; i >= 0; i--){
- resultString += inp[i];
- }
- console.log(resultString);
- }else{
- resultInt = 1 + parseFloat(inp);
- console.log(resultInt);
- }
Advertisement
Add Comment
Please, Sign In to add comment