Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 3 Functions Challenges HomeWork. Last answer can use a little guidance #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jsdwyer26
Copy link

No description provided.

var primeArray = [];
for (var i = 2; i < maxNum; i++) {
if (i * i <= maxNum) {
primeArray.push(isPrime(num));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you've written here is that you are pushing the return value of the isPrime function into the array. Looks like that return value is just "true" or "false." What you probably want to push is the actual number. I would suggest starting your debugging here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants