Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const twoCrtSort = (cur, next) => cur.length - next.length || cur.localeCompare(next);
- args.sort(twoCrtSort);
- console.log(args.join('\n'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement