|
|
|
@ -147,7 +147,7 @@ In a function we can pass different data types(number, string, boolean, object,
|
|
|
|
|
```js
|
|
|
|
|
// function with one parameter
|
|
|
|
|
function functionName(parm1) {
|
|
|
|
|
//code goes her
|
|
|
|
|
//code goes here
|
|
|
|
|
}
|
|
|
|
|
functionName(parm1) // during calling or invoking one argument needed
|
|
|
|
|
|
|
|
|
@ -170,7 +170,7 @@ console.log(square(10))
|
|
|
|
|
```js
|
|
|
|
|
// function with two parameters
|
|
|
|
|
function functionName(parm1, parm2) {
|
|
|
|
|
//code goes her
|
|
|
|
|
//code goes here
|
|
|
|
|
}
|
|
|
|
|
functionName(parm1, parm2) // during calling or invoking two arguments needed
|
|
|
|
|
// Function without parameter doesn't take input, so lets make a function with parameters
|
|
|
|
@ -705,4 +705,4 @@ It Will be covered in other section.
|
|
|
|
|
|
|
|
|
|
🎉 CONGRATULATIONS ! 🎉
|
|
|
|
|
|
|
|
|
|
[<< Day 6](../06_Day_Loops/06_day_loops.md) | [Day 8 >>](../08_Day_Objects/08_day_objects.md)
|
|
|
|
|
[<< Day 6](../06_Day_Loops/06_day_loops.md) | [Day 8 >>](../08_Day_Objects/08_day_objects.md)
|
|
|
|
|