Skip to content

Commit 0dd12c7

Browse files
authored
Merge branch 'master' into syncJuly-5
2 parents 1929ea3 + b02ef3a commit 0dd12c7

File tree

93 files changed

+2526
-2613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2526
-2613
lines changed
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
# Developer console
1+
# Consola de desarrollador
22

3-
Code is prone to errors. You will quite likely make errors... Oh, what am I talking about? You are *absolutely* going to make errors, at least if you're a human, not a [robot](https://en.wikipedia.org/wiki/Bender_(Futurama)).
3+
El código es propenso a errores. Es muy probable que cometas errores ... Oh, ¿de qué estoy hablando? *Definitivamente* vas a cometer errores, al menos si eres un humano, no un [robot](https://en.wikipedia.org/wiki/Bender_(Futurama)).
44

5-
But in the browser, users don't see errors by default. So, if something goes wrong in the script, we won't see what's broken and can't fix it.
5+
Pero en el navegador, por defecto los usuarios no ven errores. Entonces, si algo sale mal en el script, no veremos lo que está roto y no podemos arreglarlo.
66

7-
To see errors and get a lot of other useful information about scripts, "developer tools" have been embedded in browsers.
7+
Para ver los errores y obtener mucha otra información útil sobre los scripts, se han incorporado "herramientas de desarrollo" en los navegadores.
88

9-
Most developers lean towards Chrome or Firefox for development because those browsers have the best developer tools. Other browsers also provide developer tools, sometimes with special features, but are usually playing "catch-up" to Chrome or Firefox. So most developers have a "favorite" browser and switch to others if a problem is browser-specific.
9+
La mayoría de los desarrolladores se inclinan por Chrome o Firefox para el desarrollo porque esos navegadores tienen las mejores herramientas para desarrolladores. Otros navegadores también proporcionan herramientas de desarrollo, a veces con características especiales, pero generalmente están jugando a ponerse al día con Chrome o Firefox. Por lo tanto, la mayoría de los desarrolladores tienen un navegador "favorito" y cambian a otros si un problema es específico del navegador.
1010

11-
Developer tools are potent; they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands.
11+
Las herramientas de desarrollo son potentes; Tienen muchas características. Para comenzar, aprenderemos cómo abrirlas, observar errores y ejecutar comandos JavaScript.
1212

1313
## Google Chrome
1414

15-
Open the page [bug.html](bug.html).
15+
Abre la página [bug.html](bug.html).
1616

17-
There's an error in the JavaScript code on it. It's hidden from a regular visitor's eyes, so let's open developer tools to see it.
17+
Hay un error en el código JavaScript dentro de la página. Está oculto a los ojos de un visitante regular, así que abramos las herramientas de desarrollador para verlo.
1818

19-
Press `key:F12` or, if you're on Mac, then `key:Cmd+Opt+J`.
19+
Presione `key:F12` o, si está en Mac, entonces combine `key:Cmd+Opt+J`.
2020

21-
The developer tools will open on the Console tab by default.
21+
Las herramientas de desarrollador se abrirán en la pestaña Consola de forma predeterminada.
2222

23-
It looks somewhat like this:
23+
Se ve algo así:
2424

2525
![chrome](chrome.png)
2626

27-
The exact look of developer tools depends on your version of Chrome. It changes from time to time but should be similar.
27+
El aspecto exacto de las herramientas de desarrollador depende de su versión de Chrome. Cambia de vez en cuando, pero debería ser similar.
2828

29-
- Here we can see the red-colored error message. In this case, the script contains an unknown "lalala" command.
30-
- On the right, there is a clickable link to the source `bug.html:12` with the line number where the error has occurred.
29+
- Aquí podemos ver el mensaje de error de color rojo. En este caso, el script contiene un comando desconocido "lalala".
30+
- A la derecha, hay un enlace en el que se puede hacer clic en la fuente `bug.html:12` con el número de línea donde se produjo el error.
3131

32-
Below the error message, there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands. Press `key:Enter` to run them (`key:Shift+Enter` to input multi-line commands).
32+
Debajo del mensaje de error, hay un símbolo azul `>`. Marca una "línea de comando" donde podemos escribir comandos JavaScript. Presione `key:Enter` para ejecutarlos (combine `key:Shift+Enter` para ingresar comandos de varias líneas).
3333

34-
Now we can see errors, and that's enough for a start. We'll come back to developer tools later and cover debugging more in-depth in the chapter <info:debugging-chrome>.
34+
Ahora podemos ver errores, y eso es suficiente para empezar. Volveremos a las herramientas de desarrollador más adelante y cubriremos la depuración más en profundidad en el capítulo <info:debugging-chrome>.
3535

3636

37-
## Firefox, Edge, and others
37+
## Firefox, Edge, y otros
3838

39-
Most other browsers use `key:F12` to open developer tools.
39+
La mayoría de los otros navegadores usan `key:F12` para abrir herramientas de desarrollador.
4040

41-
The look & feel of them is quite similar. Once you know how to use one of these tools (you can start with Chrome), you can easily switch to another.
41+
La apariencia de ellos es bastante similar. Una vez que sepa cómo usar una de estas herramientas (puede comenzar con Chrome), puede cambiar fácilmente a otra.
4242

4343
## Safari
4444

45-
Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
45+
Safari (navegador Mac, no compatible con Windows/Linux) es un poco especial aquí. Necesitamos habilitar primero el "Menú de desarrollo".
4646

47-
Open Preferences and go to the "Advanced" pane. There's a checkbox at the bottom:
47+
Abra Preferencias y vaya al panel "Avanzado". Hay una casilla de verificación en la parte inferior:
4848

4949
![safari](safari.png)
5050

51-
Now `key:Cmd+Opt+C` can toggle the console. Also, note that the new top menu item named "Develop" has appeared. It has many commands and options.
51+
Ahora combine `key:Cmd+Opt+C` para alternar a consola. Además, tenga en cuenta que ha aparecido el nuevo elemento del menú superior denominado "Desarrollar". Tiene muchos comandos y opciones.
5252

53-
## Multi-line input
53+
## Entrada multilínea
5454

55-
Usually, when we put a line of code into the console, and then press `key:Enter`, it executes.
55+
Por lo general, cuando ponemos una línea de código en la consola y luego presionamos `key:Enter`, se ejecuta.
5656

57-
To insert multiple lines, press `key:Shift+Enter`.
57+
Para insertar varias líneas, presione la combinación `key:Shift+Enter`.
5858

59-
## Summary
59+
## Resumen
6060

61-
- Developer tools allow us to see errors, run commands, examine variables, and much more.
62-
- They can be opened with `key:F12` for most browsers on Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first).
61+
- Las herramientas para desarrolladores nos permiten ver errores, ejecutar comandos, examinar variables y mucho más.
62+
- Se pueden abrir con `key:F12` para la mayoría de los navegadores en Windows. Chrome para Mac necesita la combinación `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (primero debe habilitarse).
6363

64-
Now we have the environment ready. In the next section, we'll get down to JavaScript.
64+
Ahora tenemos el entorno listo. En la siguiente sección, nos abocaremos a JavaScript.

1-js/01-getting-started/4-devtools/bug.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<body>
99

10-
There is an error in the script on this page.
10+
Hay un error en el script de ésta página.
1111
<script>
1212
lalala
1313
</script>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
No difference.
1+
Ninguna diferencia.

1-js/02-first-steps/15-function-basics/1-if-else-required/task.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ importance: 4
22

33
---
44

5-
# Is "else" required?
5+
# ¿Es "else" requerido?
66

7-
The following function returns `true` if the parameter `age` is greater than `18`.
7+
La siguiente función devuelve `true` si el parámetro `age` es mayor a `18`.
88

9-
Otherwise it asks for a confirmation and returns its result:
9+
De lo contrario, solicita una confirmación y devuelve su resultado:
1010

1111
```js
1212
function checkAge(age) {
@@ -15,13 +15,13 @@ function checkAge(age) {
1515
*!*
1616
} else {
1717
// ...
18-
return confirm('Did parents allow you?');
18+
return confirm('¿Tus padres te permitieron?');
1919
}
2020
*/!*
2121
}
2222
```
2323

24-
Will the function work differently if `else` is removed?
24+
¿Funcionará la función de manera diferente si se borra `else`?
2525

2626
```js
2727
function checkAge(age) {
@@ -30,9 +30,9 @@ function checkAge(age) {
3030
}
3131
*!*
3232
// ...
33-
return confirm('Did parents allow you?');
33+
return confirm('¿Tus padres te permitieron?');
3434
*/!*
3535
}
3636
```
3737

38-
Is there any difference in the behavior of these two variants?
38+
¿Hay alguna diferencia en el comportamiento de estas dos variantes?

1-js/02-first-steps/15-function-basics/2-rewrite-function-question-or/solution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ Using a question mark operator `'?'`:
22

33
```js
44
function checkAge(age) {
5-
return (age > 18) ? true : confirm('Did parents allow you?');
5+
return (age > 18) ? true : confirm('¿Tús padres te lo permitieron?');
66
}
77
```
88

9-
Using OR `||` (the shortest variant):
9+
Usando Ó `||` (la variante más corta):
1010

1111
```js
1212
function checkAge(age) {
13-
return (age > 18) || confirm('Did parents allow you?');
13+
return (age > 18) || confirm('¿Tús padres te lo permitieron?');
1414
}
1515
```
1616

17-
Note that the parentheses around `age > 18` are not required here. They exist for better readabilty.
17+
Tenga en cuenta que los paréntesis alrededor de `age > 18` no son requeridos aca. Existen para una mejor legibilidad.

1-js/02-first-steps/15-function-basics/2-rewrite-function-question-or/task.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ importance: 4
22

33
---
44

5-
# Rewrite the function using '?' or '||'
5+
# Reescriba la función utilizando '?' o '||'
66

7-
The following function returns `true` if the parameter `age` is greater than `18`.
7+
La siguiente función devuelve `true` si el parametro `age` es mayor que `18`.
88

9-
Otherwise it asks for a confirmation and returns its result.
9+
De lo contrario, solicita una confirmación y devuelve su resultado.
1010

1111
```js
1212
function checkAge(age) {
1313
if (age > 18) {
1414
return true;
1515
} else {
16-
return confirm('Do you have your parents permission to access this page?');
16+
return confirm('¿Tienes permiso de tus padres para acceder a esta página?');
1717
}
1818
}
1919
```
2020

21-
Rewrite it, to perform the same, but without `if`, in a single line.
21+
Reescríbalo, para realizar lo mismo, pero sin `if`, en una sola linea.
2222

23-
Make two variants of `checkAge`:
23+
Haz dos variantes de `checkAge`:
2424

25-
1. Using a question mark operator `?`
26-
2. Using OR `||`
25+
1. Usando un operador de signo de interrogación `?`
26+
2. Usando Ó `||`

1-js/02-first-steps/15-function-basics/3-min/solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ function min(a, b) {
1010
}
1111
```
1212

13-
A solution with a question mark operator `'?'`:
13+
Una solución con un operador de signo de interrogación `'?'`:
1414

1515
```js
1616
function min(a, b) {
1717
return a < b ? a : b;
1818
}
1919
```
2020

21-
P.S. In the case of an equality `a == b` it does not matter what to return.
21+
P.D: En el caso de una igualdad `a == b` No importa qué devuelva.

1-js/02-first-steps/15-function-basics/3-min/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ importance: 1
22

33
---
44

5-
# Function min(a, b)
5+
# Función min(a, b)
66

7-
Write a function `min(a,b)` which returns the least of two numbers `a` and `b`.
7+
Escriba una función `min(a,b)` la cual devuelva el menor de dos números `a` y `b`.
88

9-
For instance:
9+
Por ejemplo:
1010

1111
```js
1212
min(2, 5) == 2

1-js/02-first-steps/15-function-basics/4-pow/solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ let x = prompt("x?", '');
1414
let n = prompt("n?", '');
1515

1616
if (n < 1) {
17-
alert(`Power ${n} is not supported,
18-
use an integer greater than 0`);
17+
alert(`Potencia ${n} no soportada,
18+
use un entero mayor a 0`);
1919
} else {
2020
alert( pow(x, n) );
2121
}

1-js/02-first-steps/15-function-basics/4-pow/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ importance: 4
44

55
# Function pow(x,n)
66

7-
Write a function `pow(x,n)` that returns `x` in power `n`. Or, in other words, multiplies `x` by itself `n` times and returns the result.
7+
Escriba la función `pow(x,n)` que devuelva `x` como potencia de `n`. O, en otras palabras, multiplique `x` por si mismo `n` veces y devuelva el resultado.
88

99
```js
1010
pow(3, 2) = 3 * 3 = 9
1111
pow(3, 3) = 3 * 3 * 3 = 27
1212
pow(1, 100) = 1 * 1 * ...* 1 = 1
1313
```
1414

15-
Create a web-page that prompts for `x` and `n`, and then shows the result of `pow(x,n)`.
15+
Cree una página web que solicite `x` y `n`, y luego muestra el resultado de `pow(x,n)`.
1616

1717
[demo]
1818

19-
P.S. In this task the function should support only natural values of `n`: integers up from `1`.
19+
PD: En esta tarea, la función solo debe admitir valores naturales de `n`: enteros hacia por encima de `1`.

0 commit comments

Comments
 (0)