Prompt not apperaring?

hello!
Here is the code, what I expect now is the prompt frame to appear, but it is not, and I am asking myself where is the mistake…

Please, if someone is in the mood, can someone help?

Many thanks!

<!DOCTYPE html>

<html>
  <body>


  <p>Please, input 3 numbers 1-9, separated by commas:</p>


  <input id="angle" type="array">

    <button onclick="myFunction()">Search!!!</button>
    <script>
    function myFunction()
    {
    var a=prompt("Please, input a number: ","a");
    var x=document.getElementById("pravokotnik").value;
   for (int i=0; i<5; i+=2){
   if (x[i]==a){alert("Number IS on the list!")}



   else{alert("Number is NOT on the list!")}

    }

   </script>
    </body>

  </html>

I doubt it would be any good for someone to assist you. Just take a look at the other thread, about the chess board. Did you offer any feedback? Did you learn anything? There’s someplace you got stuck?

The mistake is you taking stabs in the dark and doing things that appear to be way above your current expertise. Best try to properly learn JavaScript, it will be more efficient and more rewarding for everybody.

What browser are you using? Does it have an Error Console?
eg. in Firefox, Tools -> Web Developer -> Error Console
Getting used to checking error messages will help you see your mistakes and with time you should soon learn how to solve many problems this way.

Is the prompt for debugging purposes? Its use for that purpose has been obsolete since Firefox introduced a full JavaScript debugger into the browser (the last browser to do so).

If it is for collecting information for the script to actually use on a live web page then that use of prompt has been obsolete since Netscape 4 died.

There is no legitimate use for prompt in modern JavaScript and it can now be easily turned off in the web browser without affecting the page functioning because Netscape 4 died so long ago that only the occasional debugging use that someone forgot to remove should ever find its way into a live web page.

I occassionally still use an alert from time to time for simple testing purposes.
But even then, console log can be used and is much less annoying to deal with if you mistakenly put an alert inside a loop, or worse a never-ending loop, as it doesn’t steal focus from the window.

@felgall; this is a homework assignment - which admittedly doesn’t say much in terms its educational value - but the OP is stuck needing to figure this out.

It is a pity there are so many “history of JavaScript” classes around pretending to be programming courses.

Question for the OP: Is JavaScript something that you intend to make use of after the course or is it just something you need to pass as a part of a course in something else where you will never need to touch JavaScript again?

If you are taking the class to actually learn JavaScript then it will take you three times as long doing this class because you will need to first learn how it used to be done 15 years ago, then forget everything you learnt in the class, then take another class to learn how to program in JavaScript. In this instance the best you can do is drop the class and find one that teaches programming rather than history.

If it is just something that is a part of a course where your end goal is something else then by all means continue trying to learn how JavaScript was written 15 years ago - the browsers you ought to test in should be Netscape 2 through 4 and IE3 as what the class is teaching is assuming those browsers, don’t expect what you write to necessarily work properly in more modern browsers though - there are much better ways available for JavaScript to interact with browsers such as IE4+, Firefox 0.1, Opera 4, etc.