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