DEV Community

Tejkumar Kempaiah
Tejkumar Kempaiah

Posted on • Edited on

πŸ”₯ Function Call in JavaScript - Part 1

A call to execute the statement which are present inside and method is called function call/function invoke.

Ex: Below example has a function expression by name greet() which accepts the parameters "name". greet("Tej") is the method call to execute all those statement which are in between { } which is called as function scope.

β˜‘οΈ Part 1:

Part one takes about the function returning variables(char, string, number, boolean as the return data type

There are several types of function calls as mentioned below.

β˜‘οΈ1. The called function returning value

image

Output:
image

β˜‘οΈ2. The called function not returning value

image

Output:

image

β˜‘οΈ3. The called function returning variable as value

image

Output:

image

β˜‘οΈβ˜‘οΈβ˜‘οΈ More Examples:

image

Output: Try it out

image

Output: Try it out

β˜‘οΈNote: Part 1 consists of #1, #2 and #3 from the above examples.

Top comments (0)