Question: how to calculate percentage in javascript?
Answer: function percentage (p, t) {
return parseInt((p / t) * 100);
}