I’m new in JS but i need to make a task… I need a function which should wait for an integer parameter and return true in case number is prime or false in other case. I know that this is simple task but i don’t understand JS.

# Help mea please, JS function

Help mea please, JS function

0

**BenGitter**#2

Hi, have you started with the JS section?

I suppose you could try a for loop (from i = 2 to N-1) and check if N % i === 0. If so, N (input param) is not a prime (because it can be divided by another number).