In this lesson Codecademy gives an example of a function called `Square`

:

```
var square = function (x) {
return x * x;
};
```

Is there a built-in JavaScript function that squares a number? (example 2^2)

In this lesson Codecademy gives an example of a function called `Square`

:

```
var square = function (x) {
return x * x;
};
```

Is there a built-in JavaScript function that squares a number? (example 2^2)

you can use `**`

for calculating exponentiation.

`console.log(3**3)`

or is that not what you mean?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.