Closed chuksgpfr closed 3 years ago
Hello,
I see the first example works
let x = 2
let y = 2
if (x % 2 === 0 && y % 2 === 0) {
console.log("both are even")
}
node index.js
both are even
What do you want to do? Could you please provide your goal?
I was solving an algorithm question where i was suppose to
Just solve your first question
function printFizz(num) {
if(num % 3 === 0 && num % 5 !== 0) {
console.log('fizz')
}
}
printFizz(3) // fizz
printFizz(4) // nothing to print
printFizz(15) // nothing to print
You can take this as a propotype to explore another questions
I need to understand why this doesn't work
But this works.
The first works in languages like java and c#. If this needs to be worked on, I'd LOVE to CONTRIBUTE to it.