When writing a function the use of the return keyword is required if you want the function to return some kind of product. There is a few exceptions to this though when it comes to working with variables down the scope chain, and constructor functions, more on that later.
A function can be passed one or more arguments, or in other worlds independent variables, these argument values are then local to the body of the function when it comes to scope, and they are typically used in the process of creating and returning a value of some kind. However they differ from any additional variables that may be defined inside or outside of the body of the function.
Functions do not always have to be used to return something though, often a function is just used as a way to keep things encapsulated from everything else. However getting back to the topic at hand here, it is import to know that arguments can of course be added to functions by simply just having a few argument names for them. There is a lot more to write about when it comes to arguments such as the arguments object, and also the nature of the this keyword, as well as the variable scope chain as well as the prototype chain, but for now this is just the basic section.
In other words something like this.
Pure functions are functions that only work with what is given via a set of arguments, and not anything that that is a global variable of object class instance. They also do not mutate and object that is given in place but return a new object.
I have all ready covered constructor functions and how the this keyword applies there, but I should also at least mention that the this keyword can come into play outside of that of constructor functions. For example the Call function prototype method can be used to change what the value of the this keyword is, thus it is a way to break methods out of there prototypes and get them to work on any object to which it might in fact work with or without problems.
One way to start playing around with the this keyword outside of that of constructor function is to create a method that works just like a prototype method, but just make it part of a single stand alone object rather than that of a prototype object.
The call method of the function prototype can be called off of any function as any function is an instance of the function constructor and therefor prototype methods are there to work with. By calling the call method off of a function the first argument that I pass to call is a value that will be used as the value of the this keyword in the body of the function, after the first argument I can then continue passing arguments like normal.