From 9f83b6b445111296c148e8382acf0b51451dac8b Mon Sep 17 00:00:00 2001 From: Brent Guffens Date: Thu, 18 Jan 2018 18:05:05 +0100 Subject: [PATCH] Wording --- 1-js/02-first-steps/14-function-basics/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/14-function-basics/article.md b/1-js/02-first-steps/14-function-basics/article.md index 63ae4ff0..bbdec8cb 100644 --- a/1-js/02-first-steps/14-function-basics/article.md +++ b/1-js/02-first-steps/14-function-basics/article.md @@ -22,7 +22,7 @@ function showMessage() { } ``` -The `function` keyword goes first, then goes the *name of the function*, then a list of *parameters* in the brackets (empty in the example above) and finally the code of the function, also named "the function body". +The `function` keyword goes first, then goes the *name of the function*, then a list of *parameters* between the parentheses (empty in the example above) and finally the code of the function, also named "the function body", between curly braces. ![](function_basics.png) @@ -43,7 +43,7 @@ showMessage(); The call `showMessage()` executes the code of the function. Here we will see the message two times. -This example clearly demonstrates one of the main purposes of functions: to evade code duplication. +This example clearly demonstrates one of the main purposes of functions: to avoid code duplication. If we ever need to change the message or the way it is shown, it's enough to modify the code in one place: the function which outputs it.