I want to check with a prompt if a number is right.

Example: Number = 123456

if number == 123456 print out: the numbers are right

But, if only 3 numbers are right print out: Only some numbers are right

Else: Nothing right.

Possible code:

var check = prompt ("What Number?");

if (check == 123456) {
alert("You won!");
else if (check >= 3) {
alert("Only 3 numbers are right")
else {
alert("You won nothing")
I realise I should put 123456 somewhere special so the if/else knows what's right.

Anyway, how should this work?

(And is there a way to change the prompt by a html input)

Thanks for reading,