+ 7
Hi, Is it possible solve the problem without using "if else" conditional and how ?
Javascript sololearn pro https://code.sololearn.com/W5s5V17o6Lu6/?ref=app
14 odpowiedzi
+ 6
I tried but notting is appeared
https://code.sololearn.com/WRAVOlZXt5av/?ref=app
+ 6
Thanks TheWh¡teCat 🇧🇬 ☺️
+ 6
Sonic It's working fine now
https://code.sololearn.com/WsuvhtEIYVXZ/?ref=app
+ 6
You could use if(case1, case2, case3) or yiu could use logical operaters like
if(case1 && case2 && case3)
+ 5
TheWh¡teCat 🇧🇬 ,Yes that's right. Thanks to You very much ☺️
+ 3
You can use simple if or if else if ladder or nested if ,if you want to use other than if else
+ 3
EGO OK, you removed the Node.js code I see.
+ 2
I can't open your link
+ 1
EGO , for example you can use ternary operator to do it. Look at the code.
https://code.sololearn.com/W9f01xnYZtcs/?ref=app
+ 1
EGO , because it is written for node.js.
+ 1
EGO , in the following link you can find how to use readline function with node: https://nodejs.org/api/readline.html
+ 1
You are welcome, EGO 🐱
+ 1
Hello EGO use switch statement or ternary operator to eliminate if-else.
+ 1
In some cases, we can use recursion instead of if-else