← Back to challenges

Mubashir's Mystery Challenge

JavaScriptHardlogicmathnumbersinterview

Instructions

Mubashir has written a mysterious function that takes two numbers a and b and returns multiplication?. Solve the riddle of what Mubashir's function is by having a look at some of the examples below.

Examples

mubashirFunction(0, 1) ➞ 0

mubashirFunction(1, 2) ➞ 2

mubashirFunction(10, 10) ➞ 1

Notes

  • Check the Tests tab for more examples.
  • This isn't really a coding challenge, more of a fun riddle ;)
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Stupid Addition