r = Math.floor(Math.random() * arrOfCourse.length) + 1;if (arr.indexOf(r) === -1) arr.push(r);
I got this error on the r Argument of type 'number' is not assignable to parameter of type 'never'.
I'm suppose to cast r
? If I try to do:r:any = Math.floor(Math.random() * arrOfCourse.length) + 1;
nothing change...