When you write a function, the first thing to do is to define its parameters. This is done by using the function keyword followed by a params argument. Then, you’ll need to define the body of the function. The function body can contain a list of arguments or a block of statements. The argument list must end with a return statement, which is the final part of the function.