Problem 13. Write a program to print "try again" until the user enters the correct number.

let cn = 7;
let i = prompt("Enter a number");

while (i != cn) {
    console.log("try again");
    i = prompt("Enter a number");
}

console.log("you entered correct number");

Output:

output