Comparison 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 = 10, x == 10 ?'; function myFunction() { var x = 10; content = (x == 10) ? 'Đúng' : 'Sai'; document.getElementById("result").innerHTML = content; } </script> </body> </html>
PHÓNG TO