41 ms·
It works just fine in Chrome's DevTools. > dividers[2](6) 3 > dividers[undefined](6, 3) 2
by idbehold 10y ago
It works just fine in Chrome's DevTools.
> dividers[2](6)
3
> dividers[undefined](6, 3)
2
- rndgermandude 10y agoThe code uses dividers[divisor] so dividers[3](6, 3) so undefined(6,3) and that does not work
- idbehold 10y agoOh, yeah the divideSomeNumbers() function doesn't work correctly. It should probably be using: var divider = dividers[divisor] || dividers[undefined];