math
numbers
Write a function that takes an integer minutes and converts it to seconds.
convert(5) // 300
convert(3) // 180
convert(2) // 120
const convert = (minutes) => 60*minutes;
let Test = (function(){
return {
assertEquals:function(actual,expected){
if(actual !== expected){
let errorMsg = `actual is ${actual},${expected} is expected`;
throw new Error(errorMsg);
}
}
}
})();
Test.assertEquals(convert(6), 360)
Test.assertEquals(convert(4), 240)
Test.assertEquals(convert(8), 480)
Test.assertEquals(convert(60), 3600)