Basic print to console
A small program to test simply logic in JS and print to console.
by Paul Leech
HTML
<div class="body">
<div>
Simple set-up to quickly test js code by printing to console. Don't forget to open the console at the bottom of the screen.
</div>
<br>
<button id="runCode" onclick="doTheWork()">
Click To Run
</button>
<p>
<em>*To clear console, use the "Clear console" button at the top right of the console window.</em,>
</p>
</div>
CSS
.body {
width: 500px;
margin: auto;
padding: 2em;
border: 3px solid #006600;
}
JavaScript
/*
* Do your work here!
* The `doTheWork` function is where you will want
* to declare variable and build logic. You can add
* other functions below these functions to call to
* do other work if you so choose.
* Just a simple editor to help test small bits of logic
* outside of your projects.
*/
function doTheWork() {
console.log("Hello World!")
}
// more functions down here if you want!