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
Original source
21 responses to “#14 JavaScript Tutorial | Functions”
Hi sir i just love your tutorials …..i felt a fish out of water at school when i coundnt understand javascript …….Can you please provide a css tutorial as well ….
Why we need to return values when we can get output without using return and printing values in function block
Sir what to do if I want to take the values of a and b from the user??
still i have to know y we are using the return statement…..it returns to where?
i noted that .the word output automatically changed
Can you do video on => function
function FilterUtils(){
this.HSVtoRGB = function (h, s, v){
return [r * 255, g * 255, b * 255];
};
this.RGBtoHSV = function (r, g, b){
r = r/255; g = g/255; b = b/255;
return false;
};
}
can anybody tell what type of syntax is this? plz
Bro …. please make another video on Call back function or higher order function… because call back function is little more tricky….
Can u plzzz tell me the duration of the course sir!!
also can we write ?
var output = function add_2_num(a, b)
{
total = a + b;
return total ;
}
what is constructor sir….i am beginner in programming
Its a very important video for JavaScript novice learners. Friends, learn more by playing with functions and do experiments on your own.
Is function overloading possible in javaScript ?
Great video. Btw along with _ we can also use $ in between variable names
Thanks sir for this videos on javascript
Thanks you sir for the content. 😊
Can you make videos on How JS works.Very much I understand.Heap memory,Call stack,stack overflow,synchronous,asynchronous,JIT compiler.
Make one dedicated video on Data structures plz
Sir first of all my name is Aryan and i have a query about which stream I should choose after 10th class ??
IT or CS….
please reply
What is parseInt?
Bhut badiya…
First comment..❤️