pirple / The-NodeJS-Master-Class

Code samples for the Node.js Master Class
1.32k stars 1.21k forks source link

Check whether the min specified value is always lower or equals the max one #9

Open pabloabadsanz opened 6 years ago

pabloabadsanz commented 6 years ago

It can be the case that when trying to generate a random number, the min specified value is higher than the max specified one. Maybe the jokes text file is empty... In that case, I'd like to return false as the getRandomNumber result, printing then that there're no jokes in the file

pabloabadsanz commented 6 years ago

This is the code contribution for my final exam assignment in the Pirple's 'the-nodejs-master-class'