We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 3: Intro to Conditional Statements
Day 3: Intro to Conditional Statements
Sort by
recency
|
1804 Discussions
|
Please Login in order to post a comment
why my test case was faild
function addNumbers(n) { if(n % 2 !== 0) { console.log("weird")
} else { if (n >= 2 && n <= 5) { console.log("not weird") } else if(n >= 6 && n <= 20) { console.log("Weird") } else if(n > 20) { console.log("Not Weird") } } }
addNumbers(3)
My solution in C#
var isEven = N % 2 == 0;
`
Easy solution!