Defining and reuse a "classic" JS function

Have a look here: