type or paste code here
``<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylessheet" href="styles.css">
</head>
<body>
<nav id="navbar">
<header>JS DOCUMENT</header>
<ul>
<li>
<a class="nav-link" href="#Introduction">Introduction</a>
</li>
<li>
<a class="nav-link" href="#What_you_should_know">What you should know</a>
</li>
<li>
<a class="nav-link" href="#JavaScript_and_Java">JavaScript and Java</a>
</li>
<li>
<a class="nav-link" href="#Hello_World">Hello World</a>
</li>
<li>
<a class="nav-link" href="#Variables">Variables</a>
</li>
<li>
<a class="nav-link" href="#Reference">Reference</a>
</li>
</ul>
</nav>
<main id="main-doc">
<section class="main-section" id="Introduction">
<header>Introduction</header>
<a class="nav-link"></a>
<p>JavaScript is a cross-platform, object-oriented scripting language. It is a small and lightweight language. Inside a host environment (for example, a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.</p>
<p>
JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example:
</p>
<code>
const array_name = [item1, item2, ...];
</code>
<code>
const cars = ["Saab", "Volvo", "BMW"];
</code>
<ul>
<li>Client-side JavaScript extends the core language by supplying objects to control a browser and its Document Object Model (DOM). For example, client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation.</li>
<li>
Server-side JavaScript extends the core language by supplying objects relevant to running JavaScript on a server. For example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.
</li>
</ul>
</section>
<section class="main-section" id="What_you_should_know">
<header>What you should know</header>
<a class="nav-link"></a>
<p>This guide assumes you have the following basic background:</p>
<p>
Developers with a background in other languages based on C syntax are used to variables scoped by curly braces ({})
</p>
<code>
function sayHi() {
if(true) {
var s = "hi";
}
alert(s); // alert("hi") -- `s` is still within scope. }
</code>
<ul>
<li>A general understanding of the Internet and the World Wide Web (WWW).</li>
<li>Good working knowledge of HyperText Markup Language (HTML).</li>
<li>Some programming experience. If you are new to programming, try one of the tutorials linked on the main page about JavaScript.</li>
</ul>
</section>
<section class="main-section" id="JavaScript_and_Java">
<header>JavaScript and Java</header>
<a class="nav-link"></a>
<p>JavaScript and Java are similar in some ways but fundamentally different in some others. The JavaScript language resembles Java but does not have Java's static typing and strong type checking. JavaScript follows most Java expression syntax, naming conventions and basic control-flow constructs which was the reason why it was renamed from LiveScript to JavaScript.</p>
<p>
In contrast to Java's compile-time system of classes built by declarations, JavaScript supports a runtime system based on a small number of data types representing numeric, Boolean, and string values. JavaScript has a prototype-based object model instead of the more common class-based object model. The prototype-based model provides dynamic inheritance; that is, what is inherited can vary for individual objects. JavaScript also supports functions without any special declarative requirements. Functions can be properties of objects, executing as loosely typed methods.
</p>
<p>
JavaScript uses a special prototype property to solve the problems that other languages use classes to solve
</p>
<code>function Person(first, last)
{
this.first = first;
this.last = last;
}
var john = new Person("John", "Doe");
var mary = new Person("Mary", "Deer");
Person.prototype.full = function() {return this.first + " " + this.last;};
alert(john.full());</code>
<code>
window.setTimeout(function() { console.log(a); }, 1000);
console.log('hello world');
var a = 'got here';
</code>
<ul>
<li>Not all functions that you pass into other functions are asynchronous callbacks.</li>
<li>alert() is one of very few exceptions to the no-blocking rule–nothing happens until the alert window closes. Even the timeouts freeze! This is one reason that it’s usually best to avoid using alert().</li>
</ul>
</section>
<br>
<section class="main-section" id="Hello_World">
<header>Hello World</header>
<a class="nav-link"></a>
<p>A "Hello, World!" is a simple program that prints Hello, World! on the screen. Since it's a very simple program, this program is often used to introduce a new programming language to beginners.</p>
<p>To get started with writing JavaScript, open the Scratchpad and write your first "Hello world" JavaScript code:</p>
<code>main( ) {
printf("hello, world");
}</code>
<ul>
<li>
Select the code in the pad and hit Ctrl+R to watch it unfold in your browser!
</li>
</ul>
</section>
<br>
<section class="main-section" id="Variables">
<header>Variables</header>
<a class="nav-link"></a>
<p>You use variables as symbolic names for values in your application. The names of variables, called identifiers, conform to certain rules.</p>
<p>A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase).</p>
<p>You can use ISO 8859-1 or Unicode letters such as å and ü in identifiers. You can also use the Unicode escape sequences as characters in identifiers. Some examples of legal names are Number_hits, temp99, and _name.</p>
<p>
A JavaScript variable is simply a name of storage location. There are two types of variables in JavaScript : local variable and global variable. There are some rules while declaring a JavaScript variable (also known as identifiers). Name must start with a letter (a to z or A to Z), underscore( _ ), or dollar( $ ) sign.</p>
<code>var x = 5;
var y = 6;
var z = x + y;</code>
<ul>
<li>In this example, x, y, and z, are variables, declared with the let keyword</li>
</ul>
</section>
<br>
<section class="main-section" id="Reference">
<header>Reference</header>
<a class="nav-link"></a>
<article>
<ul>
<li>For more information on JavaSript and Java
<a href="https://javascript.info/">click here.</a></li>
</ul>
</article>
</section>
</main>
</body>
</html>