Intermediate Algorithm Scripting - Sum All Primes

Hello, can someone tell me what’s wrong with my code? Why undefined was returned?

And thanks

  • always share your “code snippet” over screenshot

  • always share exercise/step url

what do you think is happening in “winner” variable on its first iteration? did you try using console logs to see if that matches with your expectation?

happy coding :slight_smile:

1 Like

Comparing previous’s length number to current’s length number to find the max number

Can you tell me why sharing photo is bad? I’ve been receiving this comment before, i use ipad and i don’t know if it’s different in another device.

Thank you for taking time to help me.

  • you can not use that for any troubleshooting purposes, as in to try same “snippet” from our side to see it’s for ourselves
  • also share “step/exercise” url along with your question as well :slight_smile:
  • always happy to offer help when possible :slight_smile:

happy coding :slight_smile:

What do you mean by step/exercise? Do you mean FCC solutions url or my code’s solution url?

  • fcc “question/step/exercise” url

happy coding :slight_smile:

1 Like