Cuéntanos qué está pasando:
Buenas tardes, haciendo el test acerca de la página de documentación técnica tengo una serie de problemas. No se si es error mío o del sistema de freeCodeCamp. Mi código pasa todas las pruebas excepto 2:
- Ninguno de tus elementos
header
debe estar vacío. - Cada
.nav-link
debe tener un texto que corresponda con el texto delheader
de susection
relacionado (por ejemplo, si tienes un section/header “Hello world”, tu#navbar
debe tener un.nav-link
que tenga el texto “Hello world”).
El error, se supone que radica en el elemento header que está dentro del nav-bar, el que da título al nav-bar
En cambio, el segundo error, no soy capaz de localizar la diferencia existente entre el título del header y el nombre de cada elemento del nav-bar.
Considero que tengo el código bien, aunque a lo mejor he cometido un error y no me he dado cuenta, por lo que agradecería ayuda en este problema
Tu código hasta el momento
JS Documentation
<ul>
<li><a class="nav-link" href="#introduction">Introduction</a></li>
<li><a class="nav-link" href="#What_you_should_already_know" >What you should already know</a></li>
<li><a class="nav-link" href="#JavaScript_and_Java">JavaScript and Java</a></li>
<li><a class="nav-link" href="#Global_variables">Global Variables</a></li>
<li><a class="nav-link" href="#Function_declaration">Function Declaration</a></li>
Introduction
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.
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:
- 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>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>
What you should already know
This guide assumes you have the following basic background:
- A general understanding of the Internet and the World Wide Web (WWW).
- Good working knowledge of HyperText Markup Language (HTML).
- Some programming experience. If you are new to programming, try one of the tutorials linked on the main page about JavaScript. JavaScript and Java
- The name of the function.
- A list of arguments to the function, enclosed in parentheses and separated by commas.
- The JavaScript statements that define the function, enclosed in curly brackets, { }.
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.
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.
JavaScript is a very free-form language compared to Java. You do not have to declare all variables, classes, and methods. You do not have to be concerned with whether methods are public, private, or protected, and you do not have to implement interfaces. Variables, parameters, and function return types are not explicitly typed.
Global VariablesGlobal variables are in fact properties of the global object. In web pages the global object is window, so you can set and access global variables using the window.variable syntax.
Consequently, you can access global variables declared in one window or frame from another window or frame by specifying the window or frame name. For example, if a variable called phoneNumber is declared in a document, you can refer to this variable from an iframe as parent.phoneNumber.
Function DeclarationA function definition (also called a function declaration, or function statement) consists of the function keyword, followed by:
For example, the following code defines a simple function named square:
function square(number) { return number * number; }
The function square takes one argument, called number. The function consists of one statement that says to return the argument of the function (that is, number) multiplied by itself. The return statement specifies the value returned by the function.
return number * number;
Primitive parameters (such as a number) are passed to functions by value; the value is passed to the function, but if the function changes the value of the parameter, this change is not reflected globally or in the calling function.
ADVERTENCIAEl código semilla del desafío y/o tu solución excedió la longitud máxima que podemos transferir del desafío.
Tendrás que dar un paso adicional aquí para que el código que escribiste se presente en un formato fácil de leer.
Por favor, copia/pega todo el código del editor que se muestra en el desafío desde el que acabas de enlazar.
Reemplaza estas dos oraciones con tu código copiado.
Por favor, deja la línea ``` arriba y la línea ``` abajo,
porque permiten que tu código formatee correctamente en el post.
Información de tu navegador:
El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Challenge: Página de documentación técnica - Construye una página de documentación técnica
Enlaza al desafío: