JavaScript JavaScript Basics Creating Reusable Code with Functions Random Number Challenge, Part II Solution

Shifat Kabir
Shifat Kabir
5,443 Points

Why line #3 showing an error?

https://w.trhou.se/qczp99up71 Why line #3 is also showing an error message?

"Console showing that message" Uncaught Error: Both arguments must be numbers at getRandomNumber (random.js:3) at random.js:8

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 49,951 Points

Because you are throwing an error. If there was a catch statement that could handle the error then you wouldn't see it.