I have two variables in my react component. I want to divide one variable from another and print the value for only one decimal place. So, I choose the substring method as following:
<div className="col-md-8">
{(total_star / total_user).substring(0,2)}
</div>
In the output I am getting the following error:
TypeError: (total_star / total_user).substring is not a function
Kindly help to print substring in jsx.