diff --git a/code.png b/code.png new file mode 100644 index 0000000..26586d4 Binary files /dev/null and b/code.png differ diff --git a/metodos_arrays/metodos_arrays.html b/metodos_arrays/metodos_arrays.html index 7485982..afc0f4f 100644 --- a/metodos_arrays/metodos_arrays.html +++ b/metodos_arrays/metodos_arrays.html @@ -1,5 +1,6 @@ + @@ -9,72 +10,88 @@ + -

Transformadores

-
-
-

Pop

- -
-
-

Shift

- -
-
-

Push

- -
-
-

Reverse

- -
-
-

Unshift

- -
-
-

Sort

- +

Transformadores

+
+
+

Pop

+ + let popTest = () =>{ + let nombres = ['pedro','paco','maria']; + + document.write('Original: ' + nombres + '
'); + + let resultado = nombres.pop(); // Remueve el ultimo y lo devuele + + document.write('POP: ' + resultado + '
'); + + document.write('Resultado: ' + nombres); + + } +
+
+
+

Shift

+ +
+
+

Push

+ +
+
+

Reverse

+ +
+
+

Unshift

+ +
+
+

Sort

+ +
+
+

Splice

+ +
-
-

Splice

- -
-
-

Accesores

-
-
-

Join

- -
-
-

Slice

- -
-
-

Otros

- +

Accesores

+
+
+

Join

+ +
+
+

Slice

+ +
+
+

Otros

+ +
-
-

De Repetición

-
-
-

Filter

- +

De Repetición

+
+
+

Filter

+ +
+
+

ForEach

+ +
+
+

Map

+ +
-
-

ForEach

- -
-
-

Map

- -
-
- + + - + + \ No newline at end of file diff --git a/pepe.css b/pepe.css new file mode 100644 index 0000000..c2783a9 --- /dev/null +++ b/pepe.css @@ -0,0 +1,59 @@ + + +.main { + border: 2px red solid; + display: grid; + grid-template-columns: repeat(auto-fill,23%); + text-align: center; + grid-gap: 2%; + padding: 5%; + +} + +.main div{ + padding: 10px; + border-radius: 10px; + box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);; +} + +.main div button{ + + background: rgb(24, 24, 24); + color: rgb(245, 245, 245); + border: none; + border-radius: 100px; + padding: 10%; + cursor: pointer; + +} + +.main div button:hover{ + background: rgb(245, 245, 245); + color: rgb(24, 24, 24); + transition: background .3s ease-in; +} + +.main div:nth-child(1){ + background-color: orange; +} + + + + +.code{ + display: none; +} + +.hola{ + display: none; + user-select: none; + +} + +.popup{ + display: block; + position: relative; + margin-top: 10%; + background: #000; + color: #fff; +} diff --git a/pepe.html b/pepe.html new file mode 100644 index 0000000..6ff54bf --- /dev/null +++ b/pepe.html @@ -0,0 +1,32 @@ + + + + + + + Document + + + +
+
+

Pop

+ + let popTest = () =>{ + let nombres = ['pedro','paco','maria']; + + document.write('Original: ' + nombres + '
'); + + let resultado = nombres.pop(); // Remueve el ultimo y lo devuele + + document.write('POP: ' + resultado + '
'); + + document.write('Resultado: ' + nombres); + + } +
+ +
+ + + \ No newline at end of file diff --git a/pepe.js b/pepe.js new file mode 100644 index 0000000..8b6747b --- /dev/null +++ b/pepe.js @@ -0,0 +1,25 @@ +const test = document.querySelector('.pepe'); +const code = document.querySelector('.code'); +const hola = document.querySelector('.hola'); + +test.addEventListener('click',()=>{ + + code.classList.toggle('popup'); + hola.classList.toggle('hola'); +}) + + +let popTest = () =>{ + let nombres = ['pedro','paco','maria']; + + hola.innerHTML += ('Original: ' + nombres + '
'); + + let resultado = nombres.pop(); // Remueve el ultimo y lo devuele + + hola.innerHTML += ('POP: ' + resultado + '
'); + + hola.innerHTML += ('Resultado: ' + nombres); + +} + +popTest(); diff --git a/script.js b/script.js new file mode 100644 index 0000000..613e739 --- /dev/null +++ b/script.js @@ -0,0 +1,25 @@ +const code = document.querySelector('.code'); +const debug = document.querySelector('.debug'); + + +let popTest = () =>{ + let nombres = ['pedro','paco','maria']; + + debug.innerHTML = 'Original: ' + nombres + '
'; + + let resultado = nombres.pop(); // Remueve el ultimo y lo devuele + + debug.innerHTML += 'POP: ' + resultado + '
'; + + debug.innerHTML += 'Resultado: ' + nombres; + + +} + + + +popTest(); + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..b1ccecf --- /dev/null +++ b/style.css @@ -0,0 +1,45 @@ +div { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + height: 100vh; +} + +.code img{ + max-width: 100%; + min-width: none; +} + +.debug{ + border: #f32 solid 1px; + padding: 3%; + color: #222; + margin-top: 10px; + +} + +.red{ + color: #f32; +} + +.yellow{ + color: #ee4; +} + +.purple{ + color: #99f; +} + +.blue{ + color: #3df; +} + +.green{ + color: #2f3; +} + +.orange { + color: orange; +} + diff --git a/test.html b/test.html new file mode 100644 index 0000000..a6aebae --- /dev/null +++ b/test.html @@ -0,0 +1,26 @@ + + + + + + + + JS Review + + + + + + + +
+ + + + + +
+ + + + \ No newline at end of file