title: Takes a random integer between 1 to 10, the user is then prompted to input a guess number
body: <p>I am doing Javascript exercise. Here is a question: Write a JavaScript program where the program takes a random integer between 1 to 10, the user is then prompted to input a guess number. If the user input matches with guess number, the program will display a message "Good Work" otherwise display a message "Not matched"</p>
  
  <p>I had this code but I do not know how to get input and display an answer. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function check() {
      var x = Math.floor((Math.random() * 10) + 1);
      var i = document.getElementById('inputFiled').value;
   
      if (i === x) {
        return "Good Work";
      }else {
         return "Not matched";
      }
     
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input id="inputFiled" type=text /&gt;&lt;input type="submit" value="Submit"&gt;
  &lt;p id="random"&gt;&lt;/p&gt;
   </code></pre>
  </div>
  </div>
  </p>