https://www.codewars.com/kata/5208f99aee097e6552000148
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:
Complete the solution so that the function will break up camel casing, using a space between words.
Example
"camelCasing" => "camel Casing"
"identifier" => "identifier"
"" => ""
코드
// complete the function
function solution(string) {
let result = "";
for(let x of string){
if(x === x.toUpperCase()) result += " ";
result += x;
}
return result;
}
'알고리즘 > Codewars' 카테고리의 다른 글
[Codewars] Do I get a bonus? (8 kyu) / JavaScript (0) | 2023.02.16 |
---|---|
[Codewars] Which are in? (6 kyu) / JavaScript (0) | 2023.02.15 |
[Codewars] Grasshopper - Grade book (8 kyu) / JavaScript (0) | 2023.02.13 |
[Codewars] Rot13 (5 kyu) / JavaScript (0) | 2023.02.12 |
[Codewars] Area or Perimeter (8 kyu) / JavaScript (0) | 2023.02.11 |
댓글