how to get an absolute in js

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

Also in JavaScript: