To square a number in JavaScript, you do not need to deal with square roots. Rather, use any of the methods mentioned above, like the exponentiation operator (**).