Advertisement
bai_onzi

Untitled

Feb 15th, 2023
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let input = ['256'];
  2.  
  3.  
  4. let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
  5.  
  6. let n = gets();
  7. let nArray = n.split('');
  8. // console.log(nArray)
  9. let reversed = [];
  10.  
  11. for(let i = 0; i < nArray.length; i++){
  12.     reversed[i] = nArray[nArray.length - i - 1];
  13. }
  14. console.log(reversed);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement