title: print 1 to 5 and even and odd in HTML and JavaScript
body: <p>I have to create a html page which satisfy below requirement-
  1. print 1 to 5 with another array
  2. take number input from textbox then print on page whether it is Even or Odd.</p>
  
  <p>I have create a page but it is not working as desired.</p>
  
  <pre><code>    &lt;HTML&gt;
      &lt;HEAD&gt;
      &lt;/HEAD&gt;
      &lt;BODY&gt;
          &lt;p id="demo"&gt;&lt;/p&gt;
          &lt;input type="number" id="myNumber"&gt;
          &lt;button onclick="oddOrEven()"&gt;Try it&lt;/button&gt;
          &lt;input type="text" name="result" id="result" readonly="true"/&gt;
              &lt;SCRIPT&gt;    
              var numbers = [1,2,3,4,5];
              var myObjects = ["One","Two","Three","Four","Five"];
              var text = "";
              var myObjectsList =""
              var i;
              for (i = 0; i &lt; numbers.length; i++) {
                  text += numbers[i] + " : " + myObjects[i] + "&lt;br&gt;";
              }
              document.getElementById("demo").innerHTML = text;
  
              function oddOrEven() {
              var value = document.getElementById("myNumber").value;
              var res = if((value % 2) == 0) {"Even"} else {"Odd"}*/
              //if(value % 2 == 0) document.write("Even")
              //document.write(value);
              //document.getElementById("demo").innerHTML = res;
              readonly.value=res;
              }
              //document.write("Hello World!");
  
          &lt;/SCRIPT&gt;
  
      &lt;/BODY&gt;
      &lt;/HTML&gt;
  </code></pre>
  
  <p>Could someone please help me with the code.</p>