how to get the absolute position of an element in javascript code example Example: how to get an absolute in js var value = Math.abs(-10); // value returns 10