@@ -231,7 +231,7 @@ function sayHello() { console.log('Hello!'); }
231231
232232It won't do anything just yet. This thing is a ** function
233233definition** . You can recognise it because it starts with the word
234- ` function ` . It creates a new function named ` hello ` .
234+ ` function ` . It creates a new function named ` sayHello ` .
235235
236236Now try typing this:
237237
@@ -240,7 +240,8 @@ sayHello();
240240```
241241
242242This thing is a ** function call** . You can recognise it because
243- it's a name with ` () ` immediately afterwards. Try calling ` hello ` again.
243+ it's a name with ` () ` immediately afterwards. Try calling ` sayHello `
244+ again.
244245
245246Let's move some of this into ` script.js ` . We wrote the function
246247definition all on one line because that's all the space you have in
@@ -253,9 +254,9 @@ function sayHello() {
253254```
254255
255256Put that into ` script.js ` and reload the page. Now just try calling
256- the ` hello ` function on the console, without doing anything else. You
257- should see that it still works, using the definition that you put into
258- ` script.js ` .
257+ the ` sayHello ` function on the console, without doing anything else.
258+ You should see that it still works, using the definition that you put
259+ into ` script.js ` .
259260
260261Let's make a larger function. Put this one into ` script.js ` :
261262
@@ -274,7 +275,7 @@ definition.
274275
275276Let's get a few words for these things before we move on:
276277
277- * ` hello ` and ` conversation ` are the ** name** of the functions
278+ * ` sayHello ` and ` conversation ` are the ** name** of the functions
278279* The lines inside the braces ` {} ` are the ** body** of the function
279280* Remember from earlier that a function name followed by parentheses,
280281 like ` sayHello() ` , is a ** call**
@@ -295,7 +296,7 @@ functions. The word `function` itself is a **keyword**.
295296
296297## Function parameters
297298
298- Change your ` hello ` function definition to look like this:
299+ Change your ` sayHello ` function definition to look like this:
299300
300301``` js
301302function sayHello (person ) {
@@ -342,9 +343,9 @@ the value that was given to `return`. If the function got to the end
342343without ever seeing ` return ` then the value of the call will just be
343344` undefined ` .
344345
345- Now change your ` hello ` function to use this new ` greeting ` function,
346- instead of having the message in it. Check that ` conversation ` still
347- works afterwards.
346+ Now change your ` sayHello ` function to use this new ` greeting `
347+ function, instead of having the message in it. Check that
348+ ` conversation ` still works afterwards.
348349
349350## Multiple function parameters
350351
0 commit comments