The Math log1p() static method returns the natural logarithm (base e) of 1 + x, where x is the argument.
console.log(Math.log1p(1));
// 0.6931471805599453
console.log(Math.log1p(0));
// 0
console.log(Math.log1p(-1));
// -Infinity
console.log(Math.log1p(-2));
// NaN