Tester

Page section: playground

Some experiments from W3 schools JS course.

From:

function stringMath() {
    let mathString = `Half of 100 is ${100 / 2}.`;
    document.getElementById('String').innerHTML = mathString;
    alert('done');
}

goe ere

use the escape back slash to escape special characters:

function escapeExamples() {
    alert(`This is the first line\nThis is the second\n\tand the third with a tab space\r\\with carriage return and backslash\r\fand a form feed`)
}

open the console to this (might have to refresh first).

will open the print dialogue on your computer with the current page ready for printing.

will will add some content.

will will add some different content.

These use:

function myFun() {
  document.getElementById("heading").innerHTML = "Hello Dolly!";
  document.getElementById("paragraph").innerHTML = "How are you?";
}