Skip to content

Instantly share code, notes, and snippets.

@edinsoncs
Created October 15, 2015 04:47
Show Gist options
  • Save edinsoncs/ad4178ad00efeff2ce0c to your computer and use it in GitHub Desktop.
Save edinsoncs/ad4178ad00efeff2ce0c to your computer and use it in GitHub Desktop.
Division
/*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
},
'Secondary': {
'SecondaryOne': 40,
'SecondaryTwo': 50,
'SecondaryTree': 30,
'SecondaryFour': 20,
'SecondaryFive': 28
},
'University': {
'UniversityOne': 25,
'UniversityTwo': 60,
'UniversityTree': 80,
'UniversityFour': 30
}
};
if(alumnos.Primary.PrimaryOne == alumnos.Secondary.SecondaryOne) {
maestra = 'Parece que no coinciden las cantidades';
}
else if(alumnos.Primary.PrimaryOne == alumnos.Secondary.SecondaryFour) {
maestra = 'Coincidieron esto merece llorrar!!!';
var textEmoticon = "happy!!!";
var iT = "Bueno chicos hagamos ejercicio para la casa";
resultado = iT +" "+ division(alumnos.Primary.PrimaryOne, alumnos.University.UniversityTree);
}
else {
maestra = 'Intentar otra ves';
console.log(maestra);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment