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
/*Multiplicacion*/ | |
var multiplicar = new Function("numOne", "numTwo", "return numOne * numTwo"); | |
var obj = { | |
'chicas': 19, | |
'hombres': 20, | |
'niñas': 16, | |
'niños': 18 | |
}; | |
var resultado = multiplicar(2, 8); | |
var edad = 20; |
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
/*Division*/ | |
var division = new Function("Divisor", "Dividendo", "return Divisor / Dividendo"); | |
var maestra, resultado; | |
var alumnos = { | |
'Primary': { | |
'PrimaryOne': 20, | |
'PrimaryTwo': 24, | |
'PrimaryTree': 28, | |
'PrimaryFour': 24, | |
'PrimaryFive': 18 |
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
/*Length*/ | |
function length(param1, param2) { | |
var param1 = param1.length; | |
var param2 = param2.length; | |
if(param1 === 7 || param2 === 10) { | |
var r = "Name: " + param1 + " - " + "Surname: "+param2; | |
} | |
else { |
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
/*Push*/ | |
function personas(nombre, dni, apellido) { | |
var nombre = [nombre].push("richard","juan","luis","albert"); | |
var dni = dni; | |
var apellido = apellido; | |
if(Array(nombre)){ | |
console.log("Is Array :)"); |
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
/*Reverse*/ | |
function familyReverse(hermanos, primos, tios, familia) { | |
var hermanos, primos, tios, familia; | |
var hermanos = new Array("edinson", "richard", "luis", "aslhy"); | |
var primos = new Array("Juan", "Adrean", "Albert", "Jherson"); | |
var tios = new Array("Adelino", "Alindor", "Eliseo", "Isidro") | |
var i = 0; | |
var t = prompt("Escribe solo una vocal"); |
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
/*shift and sort*/ | |
function active(arr, orde) { | |
var array = arr; | |
array = "Esto es Sort: "+array.sort() +" Esto es Eliminar 0 de array: "+ array.shift(); | |
return array; | |
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
function state(days, message) { | |
return days; | |
return message; | |
} | |
function dias(start) { | |
var l = ["Lunes", "Martes", "Miercoles", "Jueves", "Viernes"]; | |
var start = l; | |
return start[0]; | |
} |
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
/*Concat*/ | |
function contact(string,number,simbol) { | |
var union = string.concat(number).concat(simbol); | |
function concatAll(text, numero, simbolo) { | |
var r = text + numero + simbolo; | |
console.log("Concatenar javascript . and + " + "Result"); | |
setTimeout(function(){ | |
console.log(r); | |
}, 1500); |
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
/*shift*/ | |
/*Shift borraremos*/ | |
function shiftFn(arr) { | |
var a = arr; | |
var result = a; | |
var int = setInterval(function(){ | |
result.shift(); | |
console.log('eliminando con shift ' + result.shift()); |
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
/*To server nodejs*/ | |
/*Importamos el modulo express siempre descargando*/ | |
/*NPM INSTALL --SAVE EXPRESS || --SAVE GUARDAR EN NUESTRO PACKAGE.JSON*/ | |
var express = require('express'); | |
var path = require('path'); | |
/*creamos una variable con nuestro app*/ | |
var app = express(); |
OlderNewer