Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:
I need help with these last 2 user stories,

  • All of your .nav-link elements should be in the #navbar.

  • Failed:You should have the same number of .nav-link and .main-section elements.
    Ive check my code so many times , I dont understand how I havent satisfied the criteria
    Your code so far

JS DOCUMENT
    <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>WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

please update your post with a copy of all your code, not just a sub-section of it.

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>

this nav-link is not in the nav-bar so that’s why you see the user-story for nav-links failing
(you have more than one line like this so fix all of them)

I guess im still having trouble understanding .

  • Introduction
  • this is clearly what I have in the nav bar.

    ¡Hola!

    @gdanny94

    ¿Cual es la intención de esta línea en tu codigo?

    <a class="nav-link"></a>

    Si la comparas con esta otra, notaras que realmente no tiene ningun uso ya que le falta el atributo href y no envulve nada.

    <a class="nav-link" href="#Introduction">Introduction</a>

    Entonces, realmente el problema no son los enlaces, el problema es que estos enlaces <a class="nav-link"></a> continen la class="nav-link" que no debe utilizarse fuera de esta lineas:

    <nav id="navbar">
    </nav>
    

    La solucion es que borres esas lineas y todo funcionara correctamente o si quieres comprobar lo que te comente, solo retirales o cambiales class="nav-link por algo diferente.

    Espero haber ayudado.

    saludos

    Muchas gracias! Ya pase! no se porque pensaba que necesitaba poner esas clases en cada seccion que raro.

    This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.