java script methode code example Example: java script methode function square(number) { return number * number; }