I need to clone a project with independent branches (as it is on GITHUB). The problem is that when I use the "git clone" command it clones me a single branch with the files merged from all the branches . That is, it does not clone the project with the independent branches.
Home
/
user-200546
Nano20211's questions
Nano20211
Asked:
2021-12-09 13:31:10 +0800 CST
This function returns the highest and lowest number of all those entered, so I want to validate that the user does or does enter two numbers, but I can't get it
let arr = [-1, 5, 14, 0, 6];
const elevarNumeros = (arr = undefined) => {
if (arr === undefined) return alert("Debes ingresar los numeros");
if (!(arr instanceof Array)) return alert(`${arr} no es un número`);
// Puse el if que sigue para tratar de validar pero no funciona
if (length.arr < 1) return alert("Debes ingresar dos numeros o más");
for (let num of arr) {
if (typeof num !== "number") return alert(`${arr} no es un número`);
}
console.log(`El numero mas alto es el ${Math.max(...arr)} y el mas bajo ${Math.min(...arr)}`)
}
elevarNumeros(arr);
Nano20211
Asked:
2021-11-29 11:11:41 +0800 CST
sometimes I see that they write the normal if and other times the if with the ternary operator. What does it depend on to use one or the other option? Thank you very much
if(condicion){
}
(condicion)
?
:
Nano20211
Asked:
2021-11-10 10:43:48 +0800 CST
I can't find info on how to add or subtract inside console.log
since the +
and the -
don't take them as such.