// 1
// Metodo "toLowerCase" para ignorar mayusculas en el saludo y dejar solo minusculas
let greeting = prompt("Hi! What day of the week are currently in?").toLowerCase();
if ((greeting == "sabado") || (greeting == "domingo")) {
alert("¡Buen fin de semana!");
}
else {
alert("¡Buena semana!");
}
// 2
let number = prompt("Hi! please input a positive or negative integer");
if (number >= 0) {
alert(`The number you chose is a positive number, specifically: ${number}`);
}
// Especifico la segunda condicion porque de lo contrario cualquier string mostraria esta alerta
else if (number < 0) {
alert(`The number you chose is a negative number, specifically: ${number}`);
}
// 3
let choice = prompt("Hi! Please input a number:\nHint: only half of the numbers will succeed");
let score = 0;
// Compruebo si el numero es par mirando el residuo de la division por 2
if (choice % 2 == 0) {
score = 100;
}
if (score >= 100) {
alert("You've won the 50/50!");
}
else {
alert("Sadly, you've lost");
}
// 4
let balance = prompt("Hi! Please input a number:");
alert(`Your current balance is: ${balance}`);
//5
let yourName = prompt("Hi! Please input your name down below:");
alert(`Welcome back ${yourName}`);