Recursion
Yes, it's possible. What you're referring to is called recursion. If a function is calling itself, it's a recursive function. Most of the time, people opt for the use of recursion because it may be a shorter, more human-readable solution. However, that doesn't make it easier for the program.
Should I use recursion?
It depends. More often than not, you shouldn't need to have a function call itself. You can either have a separate function handle the task, or if you're trying to traverse a data structure (table, object, etc), you can use a loop.
Is recursion bad?
In short, and for most circumstances, yes. Recursion can be very costly. This of course depends on how deep the recursion is, but most of the time it exceeds practicality. Whenever the function calls itself again, it has to create a new address in memory to allocate all the local variables and instructions within that function. All of this data is stored in the stack, which is a special place in memory that stores information like local variables and return addresses. Eventually, however, the stack can get overwhelmed with addresses, and result in the infamous stack overflow error.
Conclusion
Try to avoid recursion. Loops are quicker, and more memory efficient. This was probably a lot of new information to take in at once, so if you have any questions, just let me know.
Disclaimer
Like in every situation, it depends on how it's implemented. Just because a function is calling itself, doesn't automatically mean it's inefficient. You want to avoid recurring function calls when they start to result in a tight loop. For example, this would be a poor implementation of recursion:
Whereas this example is only calling itself once to toggle gate
until it's false (this implementation is known as debouce).