0
How do I use booleans with conditional statements in javascript?
This case I want it when 7 is typed it should show can’t use such name but when other numbers are typed it should show wick <label>nme</label> <input id="o" type="number" placeholder="your name" required> <button onclick="f()" > calculate </button> function f() { var o = 7; document.getElementById("o").value; if (o == 7) { alert("cant you such name"); } else if (o === 7 ) { alert ("wick"); } else { alert("leave"); } }
4 odpowiedzi
0
Thanks , it worked
0
How do I use alphabet instead of numbers ?
0
how can we replace if statement blocks with boolean?
0
like boolean in python. and, or, not in place of if and elif. so can we do that?