java script methode

JavaScript
function square(number) {
  return number * number;
}

Source

Also in JavaScript: