How to use the prompt from Javascript command in HTML

https://www.codecademy.com/MinecraftMaster02/codebits/HyvPn8
please check the code and tell me what’s wrong?
I also don’t know how to link console.log to the webpage. how do I do that?

JavaScript dialogs are intended to help with debugging, and ideally are not used in a production page. That’s what form controls are for. Something to research and practice.

var clashRoyale  prompt

This line is missing the, = (assignment operator).

1 Like

I know I have that removed that because it would pop up the prompt any time I typed in the code

all I want is the console.log to become a heading or paragraph, based on the players choices, or even just print onto the webpage.

The webpage is not related to the console. The console cannot render HTML. If you must use the prompt dialog, then your script will have to translate the user input to something that can be displayed in the HTML page.

A post was split to a new topic: Reactivate an account

The HTML and CSS course didn’t teach anything like that, so How do you do that translation?
would I be using JQuery?