Skip to content

Conversation

@mateusmesko
Copy link

Mateus Mesko Vaz

Copy link
Collaborator

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

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

Frankly I don't see how this improves the code besides removing some outcommented code (which should be converted to tests). The entire "isDivisible" boils down to a % b === 0 which doesn't really deserve its own function; it should probably be deleted entirely.

// isDivisible(99, 5) // returns false
export const isDivisible = (num1, num2) => {
checkFiniteNumbers(num1, num2);
if(isZero(num2))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if(isZero(num2))
if(num2 !== 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants