Show a pop-up window for the user to enter the text message

When the user needs to type any test messages in a pop-up window, use the below-added code section.

let popUpWindow = '';
while (!popUpWindow) {
    popUpWindow = prompt("Write the message to display in the pop-up window");
};
let changingReason = popUpWindow;

Here the message entered by the user will be displayed in the ‘changingReason’ variable.

Leave a comment

Your email address will not be published. Required fields are marked *