Question: how to calculate the percentage in javascript?
Answer: You divide the number you you want to get the percentage for by the number you're getting the percentage of, then multiply it by 100 and do a Math. floor to remove the decimal.