Hi! In this text, I’ll talk about how you can use browsers (assuming you’re using a desktop) to perform mathematical calculations (you can also do logical calculations). The tool that allows this use is the JavaScript Console. With the browser opened, the feature can be accessed by pressing the F12 key on your keyboard and clicking the Console tab (shortcut tested with Chrome, Firefox, and Edge browsers).

math-in-the-browser-console

 The four basic operations

To perform the four basic arithmetic operations, you only have to enter the expression as you normally do and press Enter. The result is displayed just below the typed expression. The signs used for addition, subtraction, multiplication, and division are: +, -, *, and /, respectively. Of course, it’s necessary to mention the known fifth and sixth mathematical operations, the potentiation, and the radiciation.

math-in-the-browser-console

 Potentiation and Radiciation

For potentiation, the Math.pow(x,y) method can be used, where x and y represent the base and the power exponent, respectively. For example, a power with base 2 and exponent 10 is thus: Math.pow(2,10).

In the case of the radiciation, for the square and cubic roots there are, respectively, the methods Math.sqrt(x) and Math.cbrt(x), where x is the radicand. For radices in which the radical index is greater than 3, the same method of potentiation can be used, thus: Math.pow(x,1/y), where x is the radicand and 1/y represents the inverse number of radical index. For example, the fourth root of 625 looks like this: Math.pow(625,1/4).

math-in-the-browser-console

With the above, it’s possible to go beyond what you could do in a common calculator, but it’s possible to do much more. In this link, there is a list of mathematical resources ready for use and explanations of how they work. And it can get even better, with a little programming knowledge you can create custom methods to perform calculations, subject to an upcoming text.