codingforeveryone/js

New Member #4 - Factors

Closed this issue · 7 comments

Finding factors of a positive number

Create a function that takes a number and finds the factors of it, listing them in descending order.

If the parameter is not an integer or is a negative integer, return -1

The returned factors should be in an array

Example:

factors(54) should return [54, 27, 18, 9, 6, 3, 2, 1]

@Nalinc and @franzmoro, would be great if you two made some issues for the next New Member Problems :) - I think we're on # 5 and 6.

(In case either of you missed it in the README, we keep this new member problem thing going by each new member who solves a problem then making the next problem, so theoretically we never run out of problems.)

Hi there. I'm sorry for my recent silence. I just recovered from some unexpected health issues. I have just today published a new kata on codewars (http://www.codewars.com/kata/5658475ce6919d17e5000017). I think it's an interesting problem and hopefully a good one for a new member. I'll add it here on github as problem #5. Let me know your thoughts.

Hi @franzmoro, can you post that problem as a new issue here titled "New Member 5 - Article Archive"?

added issue #44 . The [pull request] #43 is pending approval.

Bump for @Nalinc - are you able to make a new issue for a new problem? If not, no problem, I'll just close this.

@katbow: Hi there.. Apologies for late response.
I'll make a new issue for new problem by the end of the week. Thanks for closing this issue anyways

@Nalinc no worries, just thought I would double check :). Cheers!