123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <main id="main-doc">
  
 <div class="mn_sec">
  <section class="main-section" id="What_is_Javascript">
    <header>
      <h2>What is Javascript</h2>
    </header>
    <p>JavaScript is a scripting or programming language that allows you to implement complex things on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies, two of which (HTML and CSS) we have covered in much more detail in other parts of the Learning Area.
</p>
    <code>
      console.log("HELLO WORLD!!!");
    </code>
    <br>
    <code>
      console.log("HELLO WORLD!!!");
    </code>
    <br>
    <code>
      console.log("HELLO WORLD!!!");
    </code>
    <br>
    <code>
      console.log("HELLO WORLD!!!");
    </code>
    <br>
    <code>
      console.log("HELLO WORLD!!!");
    </code>
  </section>
  
  
  <section class="main-section" id="Basic_Concepts">
    <header>
      <h2>Basic Concepts</h2>
    </header>
    <p>Value vs. Reference — Understand how objects, arrays, and functions are copied and passed into functions. Know that the reference is what’s being copied. Understand that primitives are copied and passed by copying the value.</p>
        <p>
Scope — Understand the difference between global scope, function scope, and block scope. Understand which variables are available where. Know how the JavaScript engine performs variable lookup.</p>
        <p>
Hoisting — Understand that variable and function declarations are hoisted to the top of their available scope. Understand that function expressions are not hoisted.</p>
<p>Closures — Know that a function retains access to the scope that it was created in. Know what this enables us to do with our code. Understand that closures allow data hiding, memoization, and dynamic function generation.</p>
        <p>
this — Know the rules of this binding. Know how it works, know how to figure out what it will be equal to in any piece of code, and know why it’s useful.</p>
  </section>
  
  
  <section class="main-section" id="Conditionals_&_Loops">
    <header>
      <h2>Conditionals & Loops</h2>
    </header>
    
      <p>The statements for loops provided in JavaScript are:
<p>
      <ul>
        <li>for statement</li>
        <li>do...while statement</li>
        <li>while statement</li>
        <li>labeled statement</li>
        <li>break statement</li>
        <li>continue statement</li>
        <li>for...in statement</li>
        <li>for...of statement</li>
      </ul>
  </section>
  
  
  <section class="main-section" id="Functions">
    <header>
      <h2>Functions</h2>
    </header>
    <p>Functions are one of the fundamental building blocks in JavaScript. A function is a JavaScript procedure—a set of statements that performs a task or calculates a value. To use a function, you must define it somewhere in the scope from which you wish to call it.</p>
  </section>
  
  
  <section class="main-section" id="Core_Objects">
    <header>
      <h2>Core Objects</h2>
    </header>
    <p>The Object constructor creates an object wrapper for the given value. If the value is null or undefined, it will create and return an empty object, otherwise, it will return an object of a Type that corresponds to the given value. If the value is an object already, it will return the value.

</p>
  </section>
   
   <section class="main-section" id="Dom_and_Events">
    <header>
      <h2>Dom and Events</h2>
    </header>
     <p>The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects. That way, programming languages can connect to the page.

A Web page is a document. This document can be either displayed in the browser window or as the HTML source. But it is the same document in both cases. The Document Object Model (DOM) represents that same document so it can be manipulated. The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript.</p>
  </section>
  
 </div>
 
  <nav id="navbar">
    <div class="test">
    <header>
      <h2>Guide To Javascript</h2>
    </header>
    
    <hr>
    
    <ul>
      <li><a href="#What_is_Javascript" class="nav-link">What is Javascript</a></li>
      <li><a href="#Basic_Concepts" class="nav-link">Basic Concepts</a></li>
      <li><a href="#Conditionals_&_Loops" class="nav-link">Conditionals & Loops</a></li>
      <li><a href="#Functions" class="nav-link">Functions</a></li>
      <li><a href="#Core_Objects" class="nav-link">Core Objects</a></li>
      <li><a href="#Dom_and_Events" class="nav-link">Dom and Events</a></li>
    </ul>
    
      
    </div>
  </nav>
  
  
  
</main>
            
          
!
            
              
body{
  paddinh:0;
  margin:0;
}
a{
  text-decoration:none;
}

ul{
  list-style:none;
}

li {
    /* padding: 4%; */
    margin-bottom: 25px;
    border-bottom: 2px solid #ccc;
}

main{
  display:flex;
  //flex-direction:column;
}

.mn_sec{
  padding: 0 5%;
  order:2;
  //width:10%;
  
}

#navbar{
  order:1;
  background-color:#f9f9f9;
  width:100%;
  border-right: 2px solid #ccc;
 //position: fixed;
}

.test{
  position: fixed; 
}
code{
  background-color:#ccc;
  padding:2%;
  display:block;
  border-radius:5px;
}

@media screen and (max-width: 1185px) {
  main{
  display:flex;
  flex-direction:column;
}
  .test{
     position: unset; 
}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console