From 6d6a4ddb51ef6a0fdd71cb84edd0c6b3e2a92d4e Mon Sep 17 00:00:00 2001 From: Asabeneh Date: Wed, 8 Jan 2020 03:22:54 +0200 Subject: [PATCH] Day Error fixes --- 07_Day/07_day_functions.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/07_Day/07_day_functions.md b/07_Day/07_day_functions.md index 958b4da..7632f08 100644 --- a/07_Day/07_day_functions.md +++ b/07_Day/07_day_functions.md @@ -80,12 +80,13 @@ addTwoNumbers() // function has to be called to be executed by it name ``` ```js - function generateFullName (): + function generateFullName (){ let firstName = 'Asabeneh' let lastName = 'Yetayeh' let space = ' ' let fullName = firstName + space + lastName console.log(fullName) +} generateFullName() // calling a function ``` @@ -94,12 +95,13 @@ addTwoNumbers() // function has to be called to be executed by it name Function can also return values, if a function does not return values the value of the function is undefined. Let us write the above functions with return. From now on, we return value to a function instead of printing it. ```js -function generateFullName (): +function generateFullName (){ let firstName = 'Asabeneh' let lastName = 'Yetayeh' let space = ' ' let fullName = firstName + space + lastName return fullName +} console.log(generateFullName()) function addTwoNumbers {