JavaScript in a Codebit...?

Hey guys! I’ve been working on a roleplay/story game in a Codebit for my family for Christmas, and even if I test out JavaScript on a completely blank page console.log() nor prompt(). Is it that JavaScript is the bones of programming and aren’t really shown? Anyway, is there a way I can access the coding on JavaScript via HTML or CSS? Like changing font, color, etc? And vice versa. Can JavaScript reveal ‘hidden’ (like whited out text) from HTML?

Please help!

Sorry I forgot to add that console.log() and prompt() aren’t showing up. That was my main problem.

Try creating HTML tags such as <h1> and then select it with document.getElementByTagName("h1").innerHTML and set it to a variable value:

var myName = prompt("What is your name?");
document.getElementByTagName("h1").innerHTML = myName;

console.log is a debug statement, it’s not supposed to be in actual programs, it’s just to help the developer see what’s going on, and should be left out of the final code,

There are several ways to accomplish what you’re thinking, and the best way is to go through the “Make a Website” and “Make an Interactive Website”. I’d look into those tools as they can be translated directly to JavaScript files as well.

Yeah you could do that, but my idea is better :wink: