//1
function helloWorld(){
console.log("hello world");
}
helloWorld();
//2
function helloworld2(desafio2){
console.log(`Olá ${desafio2}` );
}
helloworld2("desafio2");
//3
function double(numero){
console.log(numero *2);
}
double(10);
//4
function media(n1,n2,n3){
console.log((n1 + n2 + n3)/3);
}
media(10,20,30);
//5
function mostnumber(n1,n2){
if(n1>n2){
console.log(n1);
return n1;
}
else{
console.log(n2);
return n2;
}
}
function randomNumber(){
return parseInt(Math.random() * 10 + 1);
}
let random1 = randomNumber();
let random2 = randomNumber();
console.log(random1, random2);
mostnumber(random1,random2);
//6
function numberXNumber(numero){
console.log(numero * numero);
}
numberXNumber(10);