13. Function Review


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.


or is that not what you mean?


Ok, so that would evaluate to 27, right?


well, its code, you can run it? Yes, that would indeed output 27


Alright, thanks @stetim94!


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