Advertisement
bai_onzi

Sort Names

Apr 8th, 2023
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let names = gets().split(' ');
  2. // console.log(names)
  3. for(let i = 0; i < names.length; i++){
  4.     names[i] = names[i].split('').sort().join('')
  5. }
  6. console.log(names.sort().join(' '))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement