criando o codigo e achando os numero primos retornando true e false

This commit is contained in:
PATRICK DE SOUZA SILVA 2022-10-28 17:55:25 -03:00
parent c6f6df9c59
commit e1df372303

View File

@ -1,4 +1,10 @@
export function isPrime(value) {
// implementar logica aqui
}
for (let i = 2; i < value; i++) {
if (value % i === 0) {
return false
}
}
return value > 1
}