taesik

makes this string uppercasegives it sorted in alphabetical order by last name. 본문

functions and trick/typescript_javascript

makes this string uppercasegives it sorted in alphabetical order by last name.

taesikk 2022. 1. 25. 15:21

 

 

function meeting(s) {
  let string = s.toUpperCase().split(';')
                .map(x => x.split(':').reverse().join(', '))
                .sort()
                .join(')(')
  return '(' + string + ')'
}
 

'functions and trick > typescript_javascript' 카테고리의 다른 글

string replace using regex  (0) 2022.01.26
isValidIP  (0) 2022.01.26
Sum of numbers from 0 to N  (0) 2022.01.25
how many times father see kid's falling and bouncing ball  (0) 2022.01.25
Write Number in Expanded Form  (0) 2022.01.25