Functions are one of the fundamental building blocks in JavaScript.
A function is a JavaScript procedure—a set of statements that performs a task or calculates a value.
A JavaScript function is a block of code designed to perform a particular task.
A JavaScript function is executed when “something” invokes it (calls it).
Why Functions?
You can reuse code: Define the code once, and use it many times.
You can use the same code many times with different arguments, to produce different results.
For Program code, info & more resources checkout this article - https://simplesnippets.tech/functions-in-javascript/
Video by - Tanmay Sakpal
Simple Snippets Channel link - https://www.youtube.com/simplesnippets
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.