ES6 additions

Block Scope Before ES6 (2015), JavaScript had only Global Scope and Function Scope. ES6 introduced two important new JavaScript keywords: let and const. These two keywords provide Block Scope in JavaScript.Variables declared inside a { } block cannot be accessed from outside the block:

Javascript – Common Methods

Change text elements document.getElementById(“demo”).innerHTML = “Hello JavaScript”;   Change image elements document.getElementById(‘myImage’).src=’pic_bulboff.gif’   Change css document.getElementById(“demo”).style.fontSize = “35px”;   Change display style document.getElementById(“demo”).style.display = “none”;   Print the window <button onclick=”window.print()”>Print this page</button>