Go to Live Site Next Page
The same idea in Javascript is called functions -- you define functions that do useful things, and then use them in your program.
You can name the function whatever you like, and make it do whatever you like.