When trying to use Substring in JavaScript, I encountered an error stating that 'substr' is unknown. Despite my efforts to find a solution, I am unable to resolve this issue...
function confirm_ticket(idAgir,TempsEstime) {
var str = TempsEstime;
var strConcatenate = TempsEstime.slice(0, 2) + ":" + TempsEstime.slice(2, 4);
alert("Confirm maintenance time of " + strConcatenate + " min for ticket " + idAgir);
}
Could someone please help me identify what's wrong here? Thank you!