Created
September 1, 2017 12:58
-
-
Save MedinaGitHub/36495af99cf8a582829db54e309b160d to your computer and use it in GitHub Desktop.
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
//Parametros REST | |
function agregar_alumnos(arr_alumnos, ...alumnos) { | |
for (alum of alumnos) { | |
arr_alumnos.push(alum); | |
} | |
return arr_alumnos; | |
} | |
let arr_alumnos = ["Sebastian"]; | |
let result = agregar_alumnos(arr_alumnos, "scarlet", "seba jr", "scarlet jr"); | |
console.log(result);// Resultado = ["Sebastian", "scarlet", "seba jr", "scarlet jr"]. | |
//El Operador "Spread" | |
let numeros = [1, 3, 6, 8, 98, 46]; | |
let max = Math.max(...numeros); //esto sin los ... no serviria. | |
console.log(max); // Resultado = 98 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment