Create a simple UI with one input field that accepts only numbers.
If the user types negative numbers, show "enter a positive value".
If the user types an even number, show the next 3 even numbers.
If the user types an odd number, show the next 3 odd numbers.
Top comments (2)
so how to do it can you answer?
here is my code
function fun(){
var a = document.getElementById("numvalid")
}
console.log(fun())
Solution