0

How to get an absolute value in JavaScript

JavaScript
var value = Math.abs(-10);

console.log(value); // value returns 10
RUN
add comment
Suggest a different solution or add another example