The output is also 15 when we call f(5) but returns an error when we try to print the value y. The variable y is not in the global environment.
Note: It is possible to see the source code of a function by running the name of the function itself in the console.
Finally, R uses the most recent variable definition to pass inside the body of a function. Let's consider the following example: