Okay that can be really confusing, you're right. But there actually is another way of declaring functions. What I use more often, (and they will teach you eventually), is that you can just write the word function, then write the name of the function, then introduce your parameters. Parameters are not super complicated, but it's sort of like math and f(x) functions (if you've done algebra), but basically, it's for calling the function. Functions can do pretty much anything. Calling a function is to make it work, but when you call the function, you put in parameters so that the function does something based on your input.
What I included above is about the two types of notation for defining a function.