Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>JS Bin</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- var number = 5;
- if (number % 2 === 1) { // Was failing this, had to add === 1 as a comparitor since we needed booleen value for the else if statement
- console.log('odd');
- } else {
- console.log('even');
- }
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">var number = 5;
- if (number % 2 === 1) { // Was failing this, had to add === 1 as a comparitor since we needed booleen value for the else if statement
- console.log('odd');
- } else {
- console.log('even');
- }</script></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement