https://www.codewars.com/kata/555a67db74814aa4ee0001b5
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:
In this Kata we are passing a number (n) into a function.
Your code will determine if the number passed is even (or not).
The function needs to return either a true or false.
Numbers may be positive or negative, integers or floats.
Floats with decimal part non equal to zero are considered UNeven for this kata.
코드
function testEven(n) {
return n % 2 === 0;
}
'알고리즘 > Codewars' 카테고리의 다른 글
[Codewars] Bin to Decimal (8 kyu) / JavaScript (0) | 2023.03.07 |
---|---|
[Codewars] Grasshopper - Check for factor (8 kyu) / JavaScript (0) | 2023.03.05 |
[Codewars] Round up to the next multiple of 5 (7 kyu) / JavaScript (0) | 2023.03.04 |
[Codewars] You Can't Code Under Pressure #1 (8 kyu) / JavaScript (0) | 2023.03.04 |
[Codewars] L1: Set Alarm (8 kyu) / JavaScript (0) | 2023.03.03 |
댓글