hello-js.html

1 lines ASCII Unix (LF)
1
<!doctype html>
<meta charset="utf-8">
<title>Hello World in JavaScript</title>
<style>
h1 {
    color: green;
}
</style>
 
<h1>Hello World in JavaScript</h1>
 
<p><a href="#" onclick="alert('This is a message in a popup saying Hello World');">Show an alert popup.</a></p>
 
<p><button onclick="confirm('Press F12 to open the developer tools for your browser, select the console. Then reload the page and see the message in the console.');">Show a confirm popup.</button></p>
 
<script>
document.write("<h3>This is a template!</h3>")
 
console.log("Hello in the consol.");
console.log("Here you can write inline code of JavaScript and debug your programs.");
console.log("Try writing 1+1 (at the bottom of the developer tool) and see what happens.");
console.log("Try writing: console.log('Hi')");
 
var value = 42;
console.log("Try writing: value");
 
</script>