Star rating with Javascript
I want to make a quiz with html, css and js. When the user clicks on a topic, another html page loads and he/she can start the quiz by clicking the start button, the problem is when the quiz finishes, I want to show the result of the quiz in the first html page(I mean the topic page) with star rating, ex: when the user correctly answers 3 questions out of 5, I want to give him/her 3 stars out of 5 in another html page (topic page). I made the stars using method in https://webdesign.tutsplus.com => "a simple Javascript technique for filling star ratings by George Martsoukos". But my attempts to color the stars according to the result of the quiz fail. Please help me out. Second, how to remember information about the user's result (I mean the number of golden stars), once the user visits the webpage in another time again? Thanks in advance :) Here is part of my code, but there is an error in javascrpt. what's wrong with style property? https://code.sololearn.com/Wx7C5GDWZDg9/?ref=app