Error while using if statements [closed]

Try this:

if ( primeNumber(x) )

instead of

if ( primeNumber )

And change your return statement like

return x == 2 || x == 3 || x == 5 || x == 7;

if you want to compare the value.

Browse More Popular Posts

Leave a Comment