<!DOCTYPE html> <html> <head> <title>My Web Page</title> <script src="myscript.js"></script> </head> <body> <h1>Hello, world!</h1> </body> </html>
Each new version of ECMAScript adds new features and functionality to the language. Some of the major new features added in ECMAScript 2015 include let and const for variable declarations, arrow functions, and classes. ECMAScript 2016 introduced the exponentiation operator (**), and ECMAScript 2017 added async/await for handling asynchronous code.
This program will output the string “Hello, world!” to the browser’s console.
let x = 10; // x is an integer x = "Hello"; // x is now a string