1.7 Short Look Into What Functions Are
Usually functions would appear much later when you have a much better understanding of JS. However, functions will likely be used way before its actual lesson. So, here’s a quick rundown of how a function is called.
// some function I have made already (function is named cool_function) // calling the function I have made cool_function(x, y)
In the code above, I was able to call my function with the name
cool_function. I also have
y inside parentheses. Think of these as inputs. We are giving data to the function for the function to process.