In programming, functions are named sections of a program that performs a specific task. In this sense, a function is a type of procedure or routine. When a function is called the program leaves the current section of code and begins to execute the first line inside the function. Whenever there is repetitive code or when a task repeats, consider using a function instead.
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis