This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a = 5; | |
// b = " hola"; | |
// console.log(a); | |
// console.log(b); | |
// console.log(a, b); | |
// agregar varios "console.log(a, b);" y mostrar la facilidad de cambiar todos los valores cambiando los valores de las variables | |
// const a = 7; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Fonts & Google Fonts</title> | |
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500&display=swap" rel="stylesheet"> | |
<style> | |
p { | |
/* font-family: Arial, Helvetica, sans-serif; */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Unidades de medida CSS</title> | |
<style> | |
p { | |
font-size: 2em; | |
width: 90vw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- EJEMPLO 1 --> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Formularios</title> | |
</head> | |
<body> | |
<form action=""> | |
<strong>Campo de texto</strong><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
@keyframes miAnimacion { | |
0% { | |
color: green; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Transiciones</title> | |
<style> | |
div { | |
width: 100px; | |
height: 100px; | |
background: blue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Document.getElementById(”valor del atributo id”) devuelve el | |
elemento que tiene el atributo ID con el valor especificado. --> | |
<!-- <html> | |
<body> | |
<p id="nombreId">GetElementById</p> | |
<script> | |
let elemento = document.getElementById("nombreId") | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Objeto String. Incluye métodos como: | |
// length Devuelve la longitud de una cadena de texto. | |
var cadena = "hola"; | |
var longitud = cadena.length; | |
console.log(longitud); | |
// toUpperCase() Devuelve la cadena en mayúscula. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var persona = { | |
nombre: 'Juan', | |
edad: 28, | |
genero: 'masculino', | |
intereses: ['lectura', 'fútbol'], | |
biografia: function () { | |
console.log(this.nombre + ' tiene ' + this.edad + ' años. Le gusta la ' + this.intereses[0] + ' y jugar al ' + this.intereses[1] + '.'); | |
}, | |
saludo: function() { | |
console.log('Hola, soy '+ this.nombre + '. '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Ejemplo 1: | |
let i; | |
for (i = 0; i < 5; i++) { | |
// Se ejecuta 5 veces, con valores desde paso desde 0 hasta 4. | |
console.log('Dando ', i, ' vuelta'); | |
}; | |
//Ejemplo 2: |