0
I want to display True or False in result in my code. I do this code. Thanks you.
True or False. https://code.sololearn.com/WOLvO0IjUo0x/?ref=app
2 Answers
+ 3
The following works although it is far more code than necessary:
switch (myvotes)
{
case true:
console.log (myvotes );
case false:
console.log (myvotes );
}
If you just want to print "true" or "false" to the console and myvotes has a boolean value, replace that big switch statement with just:
console.log(myvotes);
+ 2
Malick Diagne
Why aren't you using "true & false" situation?