4TH

EVEN OR ODD

4TH
Apr 2nd, 2026
6
0
Never
Not a member of GistPad yet? Sign Up, it unlocks many cool features!
HTML 2.67 KB | Source Code | 0 0
  1. <!DOCTYPE html>
  2. <title>Even or Odd</title>
  3. </head>
  4. <script type="text/javascript">
  5. var num = 40;
  6. if (num % 2 == 0) {
  7. console.log("The number is even");
  8. document.write("The number is even");
  9. }
  10. else
  11. {
  12. console.log("The number is odd");
  13. document.write("The number is odd");
  14. }
  15. </body>
  16. </html>
RAW Paste Data Copied