bai_onzi

Untitled

Feb 13th, 2023
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let inp = gets();
  2. let resultString = '';
  3. let resultInt = 0;
  4.  
  5. if(isNaN(inp)){
  6.     for(let i = inp.length - 1; i >= 0; i--){
  7.         resultString += inp[i];
  8.        
  9.     }
  10.     console.log(resultString);
  11. }else{
  12.     resultInt = 1 + parseFloat(inp);
  13.     console.log(resultInt);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment