[Fixed]-How to calculate the dfference between two variables in Django?

1👍

If you always want a positive result from the calculation you don’t need to re-order the arguments, you can just use Math.abs(), like this:

var result = 7354 - 8943;
console.log('Result:', result);
console.log('Absolute value:', Math.abs(result));

Leave a comment