https://www.codewars.com/kata/567bf4f7ee34510f69000032
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:
Implement String#digit? (in Java StringUtils.isDigit(String)), which should return true if given object is a digit (0-9), false otherwise.
코드
String.prototype.digit = function() {
return /^\d{1}$/.test(this);
};'알고리즘 > Codewars' 카테고리의 다른 글
| [Codewars] Remove duplicate words (7 kyu) / JavaScript (0) | 2023.05.01 |
|---|---|
| [Codewars] A Strange Trip to the Market (8 kyu) / JavaScript (0) | 2023.05.01 |
| [Codewars] Sum of differences in array (8 kyu) / JavaScript (0) | 2023.04.30 |
| [Codewars] Reversing Words in a String (8 kyu) / JavaScript (0) | 2023.04.29 |
| [Codewars] Count the divisors of a number (7 kyu) / JavaScript (0) | 2023.04.28 |
댓글