https://www.codewars.com/kata/551b4501ac0447318f0009cd
Codewars - Achieve mastery through coding practice and developer mentorship
Coding practice 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:
Implement a function which convert the given boolean value into its string representation.
Note: Only valid inputs will be given.
설명:
주어진 불리언 값을 문자열 표현으로 바꾸는 함수를 구현하세요.
주의: 유효한 입력만 주어집니다.
풀이
function booleanToString(b){
return b.toString();
}
toString으로 b를 문자열로 바꿔서 반환해준다.
'알고리즘 > Codewars' 카테고리의 다른 글
[Codewars] Number of People in the Bus (7 kyu) / JavaScript (0) | 2022.10.13 |
---|---|
[Codewars] Return Negative (8 kyu) / JavaScript (0) | 2022.10.12 |
[Codewars] Sum Arrays (8 kyu) / JavaScript (0) | 2022.10.12 |
[Codewars] Find the odd int (6 kyu) / JavaScript (0) | 2022.10.12 |
[Codewars] Holiday VI - Shark Pontoon (8 kyu) / JavaScript (0) | 2022.10.11 |
댓글