From 94840d52ac76bee54fb101a46c6a669627380376 Mon Sep 17 00:00:00 2001 From: fed-tuc Date: Mon, 4 Nov 2019 10:37:06 -0300 Subject: [PATCH 1/4] Agrego carpeta y ejercicios --- Fede/Ejercicio.html | 12 ++++++++++++ Fede/ejercicio.js | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Fede/Ejercicio.html create mode 100644 Fede/ejercicio.js diff --git a/Fede/Ejercicio.html b/Fede/Ejercicio.html new file mode 100644 index 0000000..809ad64 --- /dev/null +++ b/Fede/Ejercicio.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git a/Fede/ejercicio.js b/Fede/ejercicio.js new file mode 100644 index 0000000..4de68a2 --- /dev/null +++ b/Fede/ejercicio.js @@ -0,0 +1,26 @@ +var auto = { + color: "rojo", + marca: "fiat", + modelo: "bravo", + año: 2008, + encender: function () { alert('auto encendido'); + + } + +} + +// console.log (auto.color) + + +var cuenta = { + titular: 'alex', + saldo: 200, + ingresa: function (monto) {this.saldo += monto + }, + extraer: function (monto) {this.saldo -= monto}, + informar: function(){console.log("ud cuenta con un saldo de", this.saldo)} +} + +console.log ("el titular de la cuenta es", cuenta.titular); +console.log ("el saldo ingresado es", cuenta.saldo ) +console.log ("extraiste", cuenta.extraer) \ No newline at end of file From b493d06c5db5dffa716e13791be6b4f81fae6f40 Mon Sep 17 00:00:00 2001 From: fed-tuc Date: Mon, 4 Nov 2019 11:20:57 -0300 Subject: [PATCH 2/4] ejercicio-1 --- Fede/ejercicio.js | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/Fede/ejercicio.js b/Fede/ejercicio.js index 4de68a2..01394a4 100644 --- a/Fede/ejercicio.js +++ b/Fede/ejercicio.js @@ -1,26 +1,10 @@ -var auto = { - color: "rojo", - marca: "fiat", - modelo: "bravo", - año: 2008, - encender: function () { alert('auto encendido'); +var persona = { + nombre: "fede", + apellido: "turpo", + dni: "12354789", + nacimiento: "24-08-1989", + domicilio: "gral paz 881", } -} - -// console.log (auto.color) - - -var cuenta = { - titular: 'alex', - saldo: 200, - ingresa: function (monto) {this.saldo += monto - }, - extraer: function (monto) {this.saldo -= monto}, - informar: function(){console.log("ud cuenta con un saldo de", this.saldo)} -} - -console.log ("el titular de la cuenta es", cuenta.titular); -console.log ("el saldo ingresado es", cuenta.saldo ) -console.log ("extraiste", cuenta.extraer) \ No newline at end of file +console.log (persona.dni) From b304a9ec0e122db2891c307b0d04f9effe632c29 Mon Sep 17 00:00:00 2001 From: fed-tuc Date: Mon, 11 Nov 2019 09:37:25 -0300 Subject: [PATCH 3/4] ejercicio --- Fede/Ejercicio.html | 1 + Fede/ejercicio.js | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/Fede/Ejercicio.html b/Fede/Ejercicio.html index 809ad64..9e248f2 100644 --- a/Fede/Ejercicio.html +++ b/Fede/Ejercicio.html @@ -8,5 +8,6 @@ + \ No newline at end of file diff --git a/Fede/ejercicio.js b/Fede/ejercicio.js index 01394a4..4a79bed 100644 --- a/Fede/ejercicio.js +++ b/Fede/ejercicio.js @@ -8,3 +8,44 @@ var persona = { } console.log (persona.dni) + +var products = [ + { id: 1, name: "Leche", price: 120, categories: ["familiar", "comida"] }, + { id: 2, name: "Arroz", price: 80, categories: ["familiar", "comida"] }, + { id: 3, name: "Lavadora", price: 7800, categories: ["electrodomésticos"] } + ]; + + for (var i=0; i < products.length; i++) { + var product = products[i]; + console.log(product.name); + console.log(" Id: " + product.id); + console.log(" Precio: " + product.price); + console.log(" Categorías: " + product.categories.join(", ")); + } + + var clase = function () { + this.name = "paulo"; + // metodo + this.setName = function (nombre) { + this.name = nombre; + } + this.getName = function () { + return this.name; + + } + + } + + // instaciar objetos +var obj1 = new clase (); +var obj2 = new clase(); + +obj2.setName ("cesar"); + +document.write (obj1.getName()+ '
') +document.write (obj2.getName()) + + + + + From 50d8e9b5079623b8af5e0a6d0ec36de61f46e35a Mon Sep 17 00:00:00 2001 From: fed-tuc Date: Thu, 14 Nov 2019 00:19:42 -0300 Subject: [PATCH 4/4] Agrego ejercicios del insta --- Fede/Ejercicio.html | 23 ++++++++++++++++++++--- Fede/main.js | 16 ++++++++++++++++ Fede/style.css | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 Fede/main.js create mode 100644 Fede/style.css diff --git a/Fede/Ejercicio.html b/Fede/Ejercicio.html index 9e248f2..b04bd15 100644 --- a/Fede/Ejercicio.html +++ b/Fede/Ejercicio.html @@ -4,10 +4,27 @@ - Document + Filter List + - - +
+

Colors

+ + + + +
+ + \ No newline at end of file diff --git a/Fede/main.js b/Fede/main.js new file mode 100644 index 0000000..5ea697b --- /dev/null +++ b/Fede/main.js @@ -0,0 +1,16 @@ +function myFilter() { + let input, filter, ul, li, a, i, txtValue; + input = document.getElementById ('myInput'); + filter = input.value.toUpperCase(); + ul = document.getElementById('myUL'); + li = ul.getElementsByTagName('li') + for (i = 0; i < li.length; i++) { + a = li[i].getElementsByTagName('a')[0]; + txtValue = a.textContent || a.innerText; + if (txtValue.toUpperCase().indexOf(filter) > -1) { + li[i].style.display = ''; + } else { + li[i].style.display = 'none'; + } + } +} \ No newline at end of file diff --git a/Fede/style.css b/Fede/style.css new file mode 100644 index 0000000..1415a86 --- /dev/null +++ b/Fede/style.css @@ -0,0 +1,35 @@ +.container { + width: 900px; + margin: auto; + padding-top: 30px; +} + +#myInput { + width: 100%; + font-size: 16px; + padding: 12px 20px 12px 40px; + border: 1px solid #ddd; + margin-bottom: 12px; + outline: none; +} + +#myUL { + list-style-type: none; + margin: 0; + padding: 0; +} + +#myUL li a { + display: block; + border: 1px solid #ddd; + margin-top: -1px; + background-color: #f6f6f6; + padding: 12px; + text-decoration: none; + font-size: 18px; + color: #000; +} + +#myUL li a:hover:not(.header){ + background-color: #eee; +} \ No newline at end of file