This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JS Math.abs()

Math.abs(x) returns the absolute (positive) value of x:

document.getElementById("demo").innerHTML = Math.abs(-4.7);