Time check for correctness?

Good time of day.

There is a problem:
You must verify that numbers are correct time.

var isValidTime = require('./index.js');

console.info(isValidTime(12, 30)));
// true

console.info(isValidTime(12, 61)));
// false

Conditions:
It is guaranteed that the function is passed two integers.
Watch we believe is right if they are in the range [0, 23].
Minutes we believe is right if they are in the range [0, 59]. If hours and minutes are correct, then return 'true' otherwise 'false'.

index.js:

module.exports = function (hours, minutes) {

};

ps something to read to understand how to solve it?
June 10th 19 at 15:59
1 answer
June 10th 19 at 16:01
module.exports = function (hours, minutes) {
 return hours >= 0 && hours <= 23 && minutes >= 0 && minutes <= 59;
};

PS: you have a wonderful nickname

Find more questions by tags JavaScript