calculate log in javascript code example Example: calculate log in javascript var value = Math.log(2);