Recreating Multiplication

Published by Mubashir Hassan in

Create a function that takes two numbers n1 n2 and multiplies them without using *.

Examples

multiply(3, 2) ➞ 6

multiply(4, 10) ➞ 40

multiply(-2, 4) ➞ -8

Notes

Do not use * for this challenge.

Watch a quick demo on how Edabit works.