pull/648/merge
Mohammed Thalha 7 months ago committed by GitHub
commit 0c9d748c5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -94,7 +94,7 @@ function addTwoNumbers() {
let numTwo = 20 let numTwo = 20
let sum = numOne + numTwo let sum = numOne + numTwo
console.log(sum) console.log(sum) // 30
} }
addTwoNumbers() // a function has to be called by its name to be executed addTwoNumbers() // a function has to be called by its name to be executed
@ -106,7 +106,7 @@ addTwoNumbers() // a function has to be called by its name to be executed
let lastName = 'Yetayeh' let lastName = 'Yetayeh'
let space = ' ' let space = ' '
let fullName = firstName + space + lastName let fullName = firstName + space + lastName
console.log(fullName) console.log(fullName) // Asabeneh Yetayeh
} }
printFullName() // calling a function printFullName() // calling a function
@ -124,7 +124,7 @@ function printFullName (){
let fullName = firstName + space + lastName let fullName = firstName + space + lastName
return fullName return fullName
} }
console.log(printFullName()) console.log(printFullName()) --> Asabeneh Yetayeh
``` ```
```js ```js
@ -137,7 +137,7 @@ console.log(printFullName())
} }
console.log(addTwoNumbers()) console.log(addTwoNumbers()) --> 5
``` ```
### Function with a parameter ### Function with a parameter
@ -162,7 +162,7 @@ function square(number) {
return number * number return number * number
} }
console.log(square(10)) console.log(square(10)) --> 100
``` ```
### Function with two parameters ### Function with two parameters
@ -705,4 +705,4 @@ It Will be covered in other section.
🎉 CONGRATULATIONS ! 🎉 🎉 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)

Loading…
Cancel
Save