Need a solution to remove decimals from a number in TypeScript. I have tried using the parseInt method but encountered the following error:
Argument of type 'number' is not assignable to parameter of type 'string'
Code:
function testFunction (frame_count: number, frame_count_correct: number): number {
let score: number = 0
if (frame_count > 1) {
score = frame_count_correct/frame_count
} else {
score = 0
}
return parseInt(score);
}