#!/bin/bash
<a href="/comunidad/publicaciones?q=%23Roberto" data-community-hashtag="true">#Roberto</a> Nogales Rodriguez
userNumber=0
numberList=(0 1 2 3 4 5 6 7 8 9)
echo="======================================================"
read -p "Type a number and I'll multiply it by 0 to 9: " userNumber
for number in "${numberList[@]}"
do
echo "Your number ${userNumber} * $number is equal to = " $((userNumber * number))
done
exit 0
#!/bin/bash
month=""
echo="======================================================"
read -p "Type a month and get the correspond month number: " month
echo="======================================================"
case "$month" in
"january") echo "January is the month (1)"
;;
"february") echo "February is the month (2)"
;;
*) echo "This month till definine please contact with your administrator"
;;
esac
exit 0
player_name=""
player_goals=0
read -p "Who scored in the clasico? " player_name
if [ "$player_name" == "Jude Bellingham" ]; then
echo "Correct! Your the players is $player_name"
read -p "How many goals scored? " player_goals
if [ "$player_goals" -eq 2 ]; then
echo "Congratulations! You win the classico quiz game!"
else
echo "Sorry, the number goals is wrong."
fi
else
echo "Sorry, try again with a differente name."
fi
// Funciones de Primera Clase en JavaScript
// Almacenar una función en una variable function ejemplo() { return "Soy una función de primera clase"; }
let f_primera_clase = ejemplo;
// Enviar una función como argumento a otra función function uso_otra_funcion(funcion) { return funcion(); }
// Devolver una función desde otra función function quiero_otra_funcion() { return function ejemplo() { return "Soy una función devuelta y definida dentro de otra"; }; }
// Ejemplos de uso console.log("1er punto:", f_primera_clase());
console.log("2do punto:", uso_otra_funcion(ejemplo));
let f_primera_clase_otra = quiero_otra_funcion(); console.log("3er punto:", f_primera_clase_otra());
Si es posible estaria bien añadir un comentario a este video con notas adicionales ya que por defecto no esta bien explicado.