Logical Operators &
RUN
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <h1>Học lập trình miễn phí tại freetuts.net</h1> <p id="quest"></p> <p id="result"></p> <button onclick="myFunction()">Kiểm tra điều kiện</button> <script> document.getElementById("quest").innerHTML = 'x = 5, y = 4 => ( x > 4 & y > 3) ?'; function myFunction() { var x = 5; var y = 4 content = ( x > 4 & y > 3) ? 'Đúng' : 'Sai'; document.getElementById("result").innerHTML = content; } </script> </body> </html>
PHÓNG TO