Skip to content

Commit 9badaaa

Browse files
committed
susy211128
2 parents 2231d66 + a829155 commit 9badaaa

File tree

23 files changed

+37
-49
lines changed

23 files changed

+37
-49
lines changed

Diff for: 1-js/02-first-steps/01-hello-world/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Los archivos de script se adjuntan a HTML con el atributo `src`:
7373
<script src="/path/to/script.js"></script>
7474
```
7575

76-
Aquí, `/path/to/script.js` es una ruta absoluta al archivo de script (desde la raíz del sitio). También se puede proporcionar una ruta relativa desde la página actual. Por ejemplo, `src="script.js"` significaría un archivo `"script.js"` en la carpeta actual.
76+
Aquí, `/path/to/script.js` es una ruta absoluta al archivo de script desde la raíz del sitio. También se puede proporcionar una ruta relativa desde la página actual. Por ejemplo, `src="script.js"` significaría un archivo `"script.js"` en la carpeta actual.
7777

7878
También podemos dar una URL completa. Por ejemplo:
7979

Diff for: 1-js/05-data-types/03-string/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Esta es la lista completa:
8181
| Carácter | Descripción |
8282
|-----------|-------------|
8383
|`\n`|Nueva línea|
84-
|`\r`|Retorno de carro: No se usa aislado. Los archivos de texto de Windows usan una combinación de dos caracteres `\r\n` para representar un corte de línea. |
84+
|`\r`|Retorno de carro: En Windows, los archivos de texto usan una combinación de dos caracteres `\r\n` para representar un corte de línea mientras que en otros SO es simplemente '\n'. Esto es por razones históricas, la mayoría del software para Windows también entienden '\n'. |
8585
|`\'`, `\"`|Comillas|
8686
|`\\`|Barra invertida|
8787
|`\t`|Tabulación|

Diff for: 1-js/11-async/02-promise-basics/03-animate-circle-promise/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
text-align: center;
1111
}
1212
.circle {
13-
transition-property: width, height, margin-left, margin-top;
13+
transition-property: width, height;
1414
transition-duration: 2s;
1515
position: fixed;
1616
transform: translateX(-50%) translateY(-50%);

Diff for: 2-ui/1-document/02-dom-nodes/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ El DOM representa HTML como una estructura de árbol de etiquetas. A continuaci
5151
<div class="domtree"></div>
5252

5353
<script>
54-
let node1 = {"name":"HTML","nodeType":1,"children":[{"name":"HEAD","nodeType":1,"children":[{"name":"#text","nodeType":3,"content":"\n "},{"name":"TITLE","nodeType":1,"children":[{"name":"#text","nodeType":3,"content":"About elk"}]},{"name":"#text","nodeType":3,"content":"\n"}]},{"name":"#text","nodeType":3,"content":"\n"},{"name":"BODY","nodeType":1,"children":[{"name":"#text","nodeType":3,"content":"\n The truth about elk.\n\n\n"}]}]}
54+
let node1 = {"name":"HTML","nodeType":1,"children":[{"name":"HEAD","nodeType":1,"children":[{"name":"#text","nodeType":3,"content":"\n "},{"name":"TITLE","nodeType":1,"children":[{"name":"#text","nodeType":3,"content":"About elk"}]},{"name":"#text","nodeType":3,"content":"\n"}]},{"name":"#text","nodeType":3,"content":"\n"},{"name":"BODY","nodeType":1,"children":[{"name":"#text","nodeType":3,"content":"\n The truth about elk.\n"}]}]}
5555

5656
drawHtmlTree(node1, 'div.domtree', 690, 320);
5757
</script>

Diff for: 2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.view/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
timerId = null; // <-- borra timerID para indicar que el reloj fue detenido, haciendo posible iniciarlo de nuevo en clockStart()
5757
}
5858

59-
clockStart();
6059
</script>
6160

6261
<!-- cliquear este botón llama a clockStart() -->

Diff for: 2-ui/2-events/01-introduction-browser-events/07-carousel/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div id="carousel" class="carousel">
1111
<button class="arrow prev"></button>
1212
<div class="gallery">
13-
<ul class="images">
13+
<ul>
1414
<li><img src="https://en.js.cx/carousel/1.png"></li>
1515
<li><img src="https://en.js.cx/carousel/2.png"></li>
1616
<li><img src="https://en.js.cx/carousel/3.png"></li>

Diff for: 2-ui/2-events/04-default-browser-action/3-image-gallery/solution.view/gallery.css

-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ body {
44
font: 75%/120% sans-serif;
55
}
66

7-
h2 {
8-
font: bold 190%/100% sans-serif;
9-
margin: 0 0 .2em;
10-
}
11-
12-
h2 em {
13-
font: normal 80%/100% sans-serif;
14-
color: #999999;
15-
}
16-
177
#largeImg {
188
border: solid 1px #ccc;
199
width: 550px;

Diff for: 2-ui/2-events/04-default-browser-action/3-image-gallery/source.view/gallery.css

+9-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ body {
44
font: 75%/120% sans-serif;
55
}
66

7-
h2 {
8-
font: bold 190%/100% sans-serif;
9-
margin: 0 0 .2em;
10-
}
11-
12-
h2 em {
13-
font: normal 80%/100% sans-serif;
14-
color: #999999;
15-
}
16-
177
#largeImg {
188
border: solid 1px #ccc;
199
width: 550px;
@@ -32,4 +22,13 @@ h2 em {
3222

3323
#thumbs a:hover {
3424
border-color: #FF9900;
25+
}
26+
27+
#thumbs li {
28+
list-style: none;
29+
}
30+
31+
#thumbs {
32+
margin: 0;
33+
padding: 0;
3534
}

Diff for: 2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/hoverIntent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class HoverIntent {
8888
if (speed < this.sensitivity) {
8989
clearInterval(this.checkSpeedInterval);
9090
this.isHover = true;
91-
this.over.call(this.elem, event);
91+
this.over.call(this.elem);
9292
} else {
9393
// Hubo movimiento rápido, registramos las coordenadas actuales como las anteriores
9494
this.prevX = this.lastX;

Diff for: 4-binary/01-arraybuffer-binary-arrays/article.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ new TypedArray();
126126

127127
Podemos crear un `TypedArray` directamente sin mencionar `ArrayBuffer`. Pero una vista no puede existir sin un `ArrayBuffer` subyacente, por lo que se crea automáticamente en todos estos casos excepto en el primero (cuando se proporciona).
128128

129-
Para acceder al `ArrayBuffer`, hay propiedades:
130-
- `arr.buffer` : hace referencia al `ArrayBuffer`.
131-
- `arr.byteLength` : la longitud del `ArrayBuffer`.
129+
Para acceder al `ArrayBuffer` subyacente, en `TypedArray` existen las propiedades:
130+
- `buffer` : hace referencia al `ArrayBuffer`.
131+
- `byteLength` : la longitud del `ArrayBuffer`.
132132

133133
De esta forma siempre podemos pasar de una vista a otra:
134134
```js

Diff for: 7-animation/2-css-animations/3-animate-circle/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<style>
77
.circle {
8-
transition-property: width, height, margin-left, margin-top;
8+
transition-property: width, height;
99
transition-duration: 2s;
1010
position: fixed;
1111
transform: translateX(-50%) translateY(-50%);

Diff for: 7-animation/2-css-animations/3-animate-circle/source.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<style>
77
.circle {
8-
transition-property: width, height, margin-left, margin-top;
8+
transition-property: width, height;
99
transition-duration: 2s;
1010
position: fixed;
1111
transform: translateX(-50%) translateY(-50%);

Diff for: 7-animation/2-css-animations/4-animate-circle-callback/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
text-align: center;
1111
}
1212
.circle {
13-
transition-property: width, height, margin-left, margin-top;
13+
transition-property: width, height;
1414
transition-duration: 2s;
1515
position: fixed;
1616
transform: translateX(-50%) translateY(-50%);

Diff for: 7-animation/3-js-animation/1-animate-ball/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
function bounce(timeFraction) {
24-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
24+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2525
if (timeFraction >= (7 - 4 * a) / 11) {
2626
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2727
}

Diff for: 7-animation/3-js-animation/2-animate-ball-hops/solution.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
function bounce(timeFraction) {
24-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
24+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2525
if (timeFraction >= (7 - 4 * a) / 11) {
2626
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2727
}

Diff for: 7-animation/3-js-animation/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ La función `bounce` hace lo mismo, pero en orden inverso: el "rebote" comienza
283283

284284
```js
285285
function bounce(timeFraction) {
286-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
286+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
287287
if (timeFraction >= (7 - 4 * a) / 11) {
288288
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
289289
}

Diff for: 7-animation/3-js-animation/bounce-easeinout.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
function bounce(timeFraction) {
29-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
29+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
3030
if (timeFraction >= (7 - 4 * a) / 11) {
3131
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
3232
}

Diff for: 7-animation/3-js-animation/bounce-easeout.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323

2424
function bounce(timeFraction) {
25-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
25+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2626
if (timeFraction >= (7 - 4 * a) / 11) {
2727
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2828
}

Diff for: 7-animation/3-js-animation/bounce.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
animate({
2020
duration: 3000,
2121
timing: function bounce(timeFraction) {
22-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
22+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
2323
if (timeFraction >= (7 - 4 * a) / 11) {
2424
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
2525
}

Diff for: 7-animation/3-js-animation/text.view/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737

3838
function bounce(timeFraction) {
39-
for (let a = 0, b = 1, result; 1; a += b, b /= 2) {
39+
for (let a = 0, b = 1; 1; a += b, b /= 2) {
4040
if (timeFraction >= (7 - 4 * a) / 11) {
4141
return -Math.pow((11 - 6 * a - 11 * timeFraction) / 4, 2) + Math.pow(b, 2)
4242
}

Diff for: 9-regular-expressions/05-regexp-multiline-mode/article.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let str = `1er lugar: Winnie
1616
3er lugar: Eeyore`;
1717

1818
*!*
19-
alert( str.match(/^\d/gm) ); // 1, 2, 3
19+
console.log( str.match(/^\d/gm) ); // 1, 2, 3
2020
*/!*
2121
```
2222

@@ -28,7 +28,7 @@ let str = `1er lugar: Winnie
2828
3er lugar: Eeyore`;
2929

3030
*!*
31-
alert( str.match(/^\d/g) ); // 1
31+
console.log( str.match(/^\d/g) ); // 1
3232
*/!*
3333
```
3434

@@ -51,7 +51,7 @@ let str = `Winnie: 1
5151
Piglet: 2
5252
Eeyore: 3`;
5353

54-
alert( str.match(/\d$/gm) ); // 1,2,3
54+
console.log( str.match(/\d$/gm) ); // 1,2,3
5555
```
5656

5757
Sin la bandera `pattern:m`, dólar `pattern:$` solo coincidiría con el final del texto completo, por lo que solo se encontraría el último dígito.
@@ -75,7 +75,7 @@ let str = `Winnie: 1
7575
Piglet: 2
7676
Eeyore: 3`;
7777

78-
alert( str.match(/\d\n/gm) ); // 1\n,2\n
78+
console.log( str.match(/\d\n/g) ); // 1\n,2\n
7979
```
8080

8181
Como podemos ver, hay 2 coincidencias en lugar de 3.

Diff for: 9-regular-expressions/11-regexp-groups/01-test-mac/solution.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Ahora demostremos que la coincidencia debe capturar todo el texto: comience por
99
Finalmente:
1010

1111
```js run
12-
let regexp = /^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$/i;
12+
let regexp = /^[0-9a-f]{2}(:[0-9a-f]{2}){5}$/i;
1313

1414
alert( regexp.test('01:32:54:67:89:AB') ); // true
1515

Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
La etiqueta de apertura es `pattern:\[(b|url|quote)\]`.
2+
La etiqueta de apertura es `pattern:\[(b|url|quote)]`.
33

44
Luego, para encontrar todo hasta la etiqueta de cierre, usemos el patrón`pattern:.*?` con la bandera `pattern:s` para que coincida con cualquier carácter, incluida la nueva línea, y luego agreguemos una referencia inversa a la etiqueta de cierre.
55

6-
El patrón completo: `pattern:\[(b|url|quote)\].*?\[/\1\]`.
6+
El patrón completo: `pattern:\[(b|url|quote)\].*?\[/\1]`.
77

88
En acción:
99

1010
```js run
11-
let regexp = /\[(b|url|quote)\].*?\[\/\1\]/gs;
11+
let regexp = /\[(b|url|quote)].*?\[\/\1]/gs;
1212

1313
let str = `
1414
[b]hello![/b]
@@ -20,4 +20,4 @@ let str = `
2020
alert( str.match(regexp) ); // [b]hello![/b],[quote][url]http://google.com[/url][/quote]
2121
```
2222

23-
Tenga en cuenta que además de escapar `pattern:[` y `pattern:]`, tuvimos que escapar de una barra para la etiqueta de cierre `pattern:[\/\1]`, porque normalmente la barra cierra el patrón.
23+
Tenga en cuenta de que además de escapar `pattern:[` tuvimos que escapar de una barra para la etiqueta de cierre `pattern:[\/\1]`, porque normalmente la barra cierra el patrón.

0 commit comments

Comments
 (0)