Javascript, html
In this exercise, you are required to develop a simple web page to find prime numbers' within a range You should create a web page that has two text boxes and a button. In the first text box, the user enters the lower value of the range and in the second text box;the user enters the higher value of the range. The value entered in the second text box should be higher than the value entered in the second text box. When the user clicks on the button, a
element should display the list of prime numbers within the entered range In order to complete this exercise, work on the following steps 1 Create a function called "isPrime" that takes one number argument (i.e. parameter). The function should return "true" if the passed number is a prime number and "false" if it is not. Tip: Do some research on Boolean variables. You will find that in programming there is a special type of variables that can take one of the two values: "true" or "false". We call those variable Boolean variables. They are useful for testing cases. That means, you can store the result of an "if" condition in a variable. For example if you write var x=4>7 The value of x will be "false" because 4 is not greater than 7. Give it a try using the console 2- To ensure your function is correct, test it on the console by checking the following numbers if they are prime or not: 3, 7, 12, 17, 25, 49, and 131 Create a function that will respond to the click event of the button. When the user clicks on the button the following should happen 3- a. The two values entered in the text boxes should be read and stored in variables b. All values entered in a text box are treated as text! So if a user enters 3 and 7 in the first and second text boxes, respectively, and you store them in variables xand y, respectively, then xty is going to be 37! Not 10, as you would expect. Therefore, you need to transform (i.e. parse) them from text to numbers. Do some research on how to do so in Javascript and apply that to the variables you defined in step (a) The user should get an alert with an error message if s/he enters the second value lower than the first From all the numbers between the two entered numbers, only the prime numbers should be displayed in a blue-bordered div. Use the "isPrime" function that you wrote to achieve c. d. Look at the image below for an illustration of how the web page should look like