How to use the prompt from Javascript command in HTML


#1

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?


#2

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).


#3

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


#4

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.


#5

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.


#6

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


#9

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