https://www.codewars.com/kata/57cfdf34902f6ba3d300001e
Codewars - Achieve mastery through coding practice and developer mentorship
A coding practice website for all programming levels – Join a community of over 3 million developers and improve your coding skills in over 55 programming languages!
www.codewars.com
DESCRIPTION:
You will be given a list of strings. You must sort it alphabetically (case-sensitive, and based on the ASCII values of the chars) and then return the first value.
The returned value must be a string, and have "***" between each of its letters.
You should not remove or add elements from/to the array.
코드
function twoSort(s) {
return s.sort()[0].split('').join('***');
}
'알고리즘 > Codewars' 카테고리의 다른 글
[Codewars] Summing a number's digits (7 kyu) / JavaScript (0) | 2023.03.11 |
---|---|
[Codewars] The Wide-Mouthed frog! (8 kyu) / JavaScript (0) | 2023.03.10 |
[Codewars] Small enough? - Beginner (7 kyu) / JavaScript (0) | 2023.03.08 |
[Codewars] Bin to Decimal (8 kyu) / JavaScript (0) | 2023.03.07 |
[Codewars] Grasshopper - Check for factor (8 kyu) / JavaScript (0) | 2023.03.05 |
댓글