Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const half = args.length / 2;
- const firstPart = args.substr(0,half);
- const secondPart = args.substr(half);
- const reversFirsPart = firstPart.split('').reverse();
- const reversSecondPart = secondPart.split('').reverse();
- console.log(reversFirsPart.join(''));
- console.log(reversSecondPart.join(''));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement