Start a personal dev blog on your domain for free with Hashnode and grow your readership.
Get Started

Function,Function Defination, Function Expression, Function Execution, and Function reference

Function

A function is an object. The function defining with the Name word. and we can provide parameters and we return the concatenating the parameters. There are two ways to defining the function. One is Function Definition and the second one is Function Expression. follow the below example for better understanding.

function fullName(firstName,lastName){
    return  `${firstName}  ${lastName}`
}
fullName("Alt","Campus") // Alt Campus

Function Defination

The function defination is nothing but defining the function with the name of words. provide the parameters and return that parameters . Example

function add( one , two){
   return  one + two
}
add(2,5)

Function Expression

The function Expression is simply saying, a function stored into a variable is called function expression because the function is an object that's why we can easily store in a variable . follow the example to understand the better manner.

let fullName = function(firstName,lastName){
    return `${firstName} ${lastName}`
}
fullName('Narasimhulu', 'Vasam')

Function Execution / call

The Function execution is a series of steps implementation. Let's know in a detailed manner, after defining a function with providing parameters we can return the concatenating of the parameters. we call the function with the providing arguments is called function call and function execution.

example: -

Father always guides children right, for suppose take a one-story of the daily life of father and son. father always teaches his son. son before even doesn't know how to do brush his teeth . father will guide him one day with the one-by-one steps. the next day son is following the same steps that are called function execution.


let fullName = function(firstName,lastName){
    return `${firstName} ${lastName}`
}
fullName('Narasimhulu', 'Vasam')  // Function Execution (or) Function call

Function Reference

The function reference is a series of steps following that is called function Reference. For an understanding look at the above example father and son. in this story the process of stapes are referenced.

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more

No Comments Yet