How do I code to get a result | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I code to get a result

Trying to make a function work and give a result. function fizzyDrink(canSize) { if (canSize % 3 === 0 && canSize % 5 === 0) { console.log("Semi-Fizzy"); } else if (canSize % 3 === 0) { console.log("Fizzy"); } else if (canSize % 5 === 0) { console.log("Non-Fizzy"); } else { console.log(canSize) }}

19th Aug 2022, 5:14 PM
Masaki Makino
Masaki Makino - avatar
1 Answer
0
You have defined function defination but you not calling it After last else call the function fizzDrink(5) and pass one argument
19th Aug 2022, 5:18 PM
A S Raghuvanshi
A S Raghuvanshi - avatar