Cleaner return randomNumber

This commit is contained in:
Divlo 2019-08-29 23:53:28 +02:00
parent 43b337238e
commit e28f3c5aea
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ function randomNumber(min, max) {
if (!isNaN(min) && !isNaN(max) && min < max)
{
let randomNumber = Math.floor(Math.random() * (max - min +1)) + min;
return randomNumber;
return "Nombre aléatoire compris entre " + min + " inclus et " + max + " inclus : " + randomNumber;
}
else if (min > max)
{

View File

@ -44,7 +44,7 @@ $(function () {
}
else
{
$('.results').html("Nombre aléatoire compris entre " + minEntered + " inclus et " + maxEntered + " inclus : " + result);
$('.results').html(result);
}
}
});