I am working on javascript here I am having some function which should pass all the test cases given in stackblitz. I just want to divide the number after point by 60
Here is the code so far I tried
convert(min: any) {
return min.split(".")[1] / 60;
}
Any my input is
console.log(this.convert(2.0));
console.log(this.convert(2.15));
console.log(this.convert(2.3));
console.log(this.convert(2.45));
and my output should give like this
2.0
2.25
2.5
2.75
Any help?