クイズプログラム用のこのJavaScriptコードがありますが、最後のコンテキスト行の計算結果を小数点以下1桁で返す方法がわかりません。助言がありますか ?
EndQuiz=function(){
canvas.removeEventListener('click',ProcessClick,false);
context.drawImage(quizbg, 0,0,550,90,0,0,550,400);
context.font = "20pt Georgia,Arial";
context.fillText("Thanks for finishing. ",20,80);
context.fillText("This is how good you were:",20,120);
context.font = "16pt Georgia,Calibri,Arial";
context.fillText("Correct answers: "+String(rightanswers)+" of "+String(rightanswers+wronganswers),20,180);
context.fillText("Correct: "+String(rightanswers/(wronganswers+rightanswers)*100)+"%",20,240);1