Skip to content

Instantly share code, notes, and snippets.

@agustinpfs
agustinpfs / var-let-const.js
Created July 2, 2020 01:41
Javascript básico. var, let y const.
// 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;
@agustinpfs
agustinpfs / fuentes.html
Created June 30, 2020 02:08
CSS básico. Fuentes y Google fonts.
<!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; */
@agustinpfs
agustinpfs / unidades-medida.html
Created June 29, 2020 16:25
Ejemplo Unidades de Medida CSS
<!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;
@agustinpfs
agustinpfs / forms.html
Last active June 17, 2020 20:28
HTML básico. Formularios.
<!-- EJEMPLO 1 -->
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Formularios</title>
</head>
<body>
<form action="">
<strong>Campo de texto</strong><br>
@agustinpfs
agustinpfs / animations-css.html
Created June 12, 2020 22:56
CSS básico. Animaciones.
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
@keyframes miAnimacion {
0% {
color: green;
@agustinpfs
agustinpfs / transitions.html
Created June 12, 2020 15:08
CSS básico. Transiciones.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Transiciones</title>
<style>
div {
width: 100px;
height: 100px;
background: blue;
@agustinpfs
agustinpfs / dom.html
Last active June 12, 2020 13:28
Javascript básico. DOM.
<!-- 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>
@agustinpfs
agustinpfs / metodos.js
Last active July 1, 2020 13:23
Javascript básico. Métodos.
// 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.
@agustinpfs
agustinpfs / objects.js
Last active July 7, 2020 19:51
Javascript básico. Objetos.
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 + '. ');
@agustinpfs
agustinpfs / loop-for.js
Last active July 7, 2020 19:45
Javascript básico. Bucle for.
//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: