Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let input = ['256'];
- let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- let n = gets();
- let nArray = n.split('');
- // console.log(nArray)
- let reversed = [];
- for(let i = 0; i < nArray.length; i++){
- reversed[i] = nArray[nArray.length - i - 1];
- }
- console.log(reversed);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement