17 lines
857 B
HTML
17 lines
857 B
HTML
<!-- Reading School 2018, HTML page by Matthew Grove, Year 10 -->
|
|
<h2>JavaScript</h2>
|
|
<p>
|
|
JavaScript (JS) is a high-level, client-side language, meaning that it is like a human language
|
|
(rather than, for example, binary) and runs on the end user's computer. It is used for many purposes,
|
|
including editing content on a webpage, performing mathematical operations and storing variables.
|
|
Each line of JavaScript should end in a semicolon, for example:
|
|
<br>
|
|
<code>
|
|
// this code sets the content of the element with the ID "id_name" to "Hello World!"<br>
|
|
document.getElementById("id_name").innerHTML = "Hello World!";
|
|
</code>
|
|
<br>
|
|
A single line comment in JS is denoted by a double forward slash (<code>//</code>); a multi line comment
|
|
is started with <code>/*</code> and ended with <code>*/</code>.
|
|
</p>
|