r/javaScriptStudyGroup • u/ForScale • May 10 '16
CHALLENGE: Write a multiplication function...
CHALLENGE:
Write a multiplication function that takes two numbers integers as arguments and returns their product.
Rules:
Cannot use
*or/operatorsCannot use Math object
Cannot use for (any variation) or while (including do) loops
2
Upvotes
1
u/ForScale May 10 '16
Nice! I came up with two ways to do it. Both use a similar approach to avoid loops, but one uses a predefined method where the other does not.
I don't consider a blank Pen to be cheating, but I also don't consider it to be a valid answer! ;) I think you forgot to click save...