the best way of solve logarithm in js

JavaScript
var value = Math.log(2);Math.log(n)
Source

Also in JavaScript: