https://www.codewars.com/kata/583710ccaa6717322c000105
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:
This kata is about multiplying a given number by eight if it is an even number and by nine otherwise.
코드
function simpleMultiplication(number) {
return number % 2 === 0 ? number * 8 : number * 9;
}
댓글