how to use javascript to fetch numeric data from database and divide by a constant value before displaying code example
Example 1: js calculate
answer_Add = 5 + 1;
answer_Sub = 5 - 1;
answer_Multi = 5 * 5;
answer_Divi = 10 / 2;
Total = answer_Add + answer_Sub + answer_Multi + answer_Divi;
Example 2: javascript Arithmetic operators
var additionOutput = 2 + 2;
var subtractionOutput = 2 - 2;
var multiplcationOutput = 2 * 2;
var divisionOutput = 2 / 2;
var exponentiation = 2**2;
var modulus = 5 % 2;
var unaryOperator = 1;
++unaryOperator;