@@ -222,7 +222,7 @@ var var = 1;
222222Start by typing this on the console:
223223
224224``` js
225- function hello () { console .log (' Hello!' ); }
225+ function sayHello () { console .log (' Hello!' ); }
226226```
227227
228228It won't do anything just yet. This thing is a ** function
@@ -232,7 +232,7 @@ definition**. You can recognise it because it starts with the word
232232Now try typing this:
233233
234234``` js
235- hello ();
235+ sayHello ();
236236```
237237
238238This thing is a ** function call** . You can recognise it because
@@ -243,7 +243,7 @@ definition all on one line because that's all the space you have in
243243the console, but the normal way to write one is like this:
244244
245245``` js
246- function hello () {
246+ function sayHello () {
247247 console .log (' Hello!' );
248248}
249249```
@@ -257,7 +257,7 @@ Let's make a larger function. Put this one into `script.js`:
257257
258258``` js
259259function conversation () {
260- hello ();
260+ sayHello ();
261261 console .log (' How are you?' );
262262 console .log (' Goodbye' );
263263}
@@ -273,7 +273,7 @@ Let's get a few words for these things before we move on:
273273* ` hello ` and ` conversation ` are the ** name** of the functions
274274* The lines inside the braces ` {} ` are the ** body** of the function
275275* Remember from earlier that a function name followed by parentheses,
276- like ` hello ()` , is a ** call**
276+ like ` sayHello ()` , is a ** call**
277277
278278Function names are ** identifiers** , the same as variables. That means
279279they have exactly the same rules about what names you may give to your
@@ -294,12 +294,12 @@ functions. The word `function` itself is a **keyword**.
294294Change your ` hello ` function definition to look like this:
295295
296296``` js
297- function hello (person ) {
297+ function sayHello (person ) {
298298 console .log (' Hello ' + person + ' !' );
299299}
300300```
301301
302- Now try calling it using ` hello ('Archibald')` .
302+ Now try calling it using ` sayHello ('Archibald')` .
303303
304304That probably isn't your name. Try calling the function again using
305305your own name.
0 commit comments