Skip to content

Instantly share code, notes, and snippets.

View sebasmanu14's full-sized avatar

Sebastian Manobanda sebasmanu14

View GitHub Profile
@sebasmanu14
sebasmanu14 / logaritmos.js
Created July 13, 2020 02:05
estas con logaritmos de freecodecamp con las javascript
//1
function convertToF(celsius) {
let fahrenheit = celsius * 9/5 + 32;;
return fahrenheit;
}
convertToF(30);
//2
function reverseString(str) {
@sebasmanu14
sebasmanu14 / passing values.js
Created July 13, 2020 01:32
esta funcion se suma a partir de la adicion de numeros
function functionWithArgs(a, b) {
console.log(a + b);
}
functionWithArgs(10, 5);
@sebasmanu14
sebasmanu14 / manipulate_unshift.js
Created July 13, 2020 01:26
manipulacion con el unshift
// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();
// Only change code below this line
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();
myArray.unshift(["Paul", 35]);
@sebasmanu14
sebasmanu14 / manipulate_shift.js
Created July 13, 2020 01:20
manipular arrays con el shift
// Setup
var myArray = [["John", 23], ["dog", 3]];
// Only change code below this line
var removedFromMyArray = myArray.shift();
@sebasmanu14
sebasmanu14 / cambio_nombres.js
Last active July 7, 2020 03:31
a partir de la destructuracion se puede cambiar el nombre de las variables que se encuentrar en dentro de la const
const HIGH_TEMPERATURES = {
yesterday: 75,
today: 77,
tomorrow: 80
};
// Only change code below this line
const {today:highToday} = HIGH_TEMPERATURES;
const {tomorrow:highTomorrow} = HIGH_TEMPERATURES;
@sebasmanu14
sebasmanu14 / destructuracion.js
Created July 7, 2020 03:22
para poder hacer la destructuracion se pone { }
const HIGH_TEMPERATURES = {
yesterday: 75,
today: 77,
tomorrow: 80
};
// Only change code below this line
const {today} = HIGH_TEMPERATURES; /////haciii
const {tomorrow} = HIGH_TEMPERATURES;
@sebasmanu14
sebasmanu14 / 3_puntos_Arr.js
Created July 7, 2020 03:18
puede que los tres puntos sean para llamar a la const tambuien para guardar const
const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY'];
let arr2;
arr2 = [...arr1]; // Change this line
console.log(arr2);
@sebasmanu14
sebasmanu14 / 3_puntos.js
Created July 7, 2020 03:13
los 3 puntos todavia nose como definirlos
const sum = (x, y, z) => {
const args = [x, y, z];
return args.reduce((a, b) => a + b, 0);
}
//
const sum = (...args) => {
return args.reduce((a, b) => a + b, 0);
}
@sebasmanu14
sebasmanu14 / def_valores.js
Last active July 7, 2020 03:10
en lo que se refiere a arrow lo que esta dentro puede no estar definido y solo se puede tener que utilizar los valores que se le pueden asignar
const increment = (number, value = 1) => number + value;
console.log(increment(5, 2));
console.log(increment(5));
@sebasmanu14
sebasmanu14 / arrow.js
Created July 7, 2020 03:05
la (=>) se puede asignar con dos variables con la función arrow
const myConcat =(arr1, arr2) => {
"use strict";
return arr1.concat(arr2);
};
console.log(myConcat([1, 2], [3, 4, 5]));