|
Size: 1053
Comment:
|
← Revision 6 as of 2025-12-19 20:28:39 ⇥
Size: 801
Comment: Java -> ECMA
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| = JavaScript = | = ECMAScript = |
| Line 3: | Line 3: |
| '''JavaScript''' is a lightweight scripting language designed to be run in web browsers. | '''ECMAScript''' is a scripting language for the web. Sometimes known as '''Java``Script'''. |
| Line 13: | Line 13: |
| As a standalone JavaScript file: |
|
| Line 19: | Line 17: |
| This can be used in a web page like: | This can be embedded into web page like: |
| Line 27: | Line 25: |
| <script src="example.js"></script> | <script> console.log("Hello, world!"); </script> |
| Line 29: | Line 29: |
| <body> <p>"Hello, world!" has been written to the console.</p> </body> |
|
| Line 35: | Line 32: |
| The script can also be embedded directly into the HTML like: | Instead of the script being inline, it can be sourced from an external file like: |
| Line 38: | Line 35: |
| <script> console.log("Hello, world!"); </script> |
<script src="example.js"></script> |
| Line 49: | Line 44: |
| * [[JavaScript/Async|Async]] * [[JavaScript/Builtins|Built-ins]] * [[JavaScript/CryptoSubtle|CryptoSubtle]] * [[JavaScript/Math|Math]] == Frameworks == * [[JavaScript/JQuery|jQuery]] |
* [[ECMAScript/Objects|Objects]] |
ECMAScript
ECMAScript is a scripting language for the web. Sometimes known as JavaScript.
Contents
Example
console.log("Hello, world!");This can be embedded into web page like:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example</title>
<script>
console.log("Hello, world!");
</script>
</head>
</html>Instead of the script being inline, it can be sourced from an external file like:
<script src="example.js"></script>
Language
