challenge-algorithms-v2.0-h.../05-isPrime/index.js

12 lines
216 B
JavaScript
Raw Normal View History

export function isPrime(value) {
// implementar logica aqui
2022-10-29 01:57:13 +00:00
let primo = true
for(let i = 2; i < value; i++){
if(value % i === 0){
primo = false
break
}
}
return primo
}