Skip to content

Commit 2f7dce9

Browse files
switch mentions of method to function
1 parent 10555b9 commit 2f7dce9

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ failures = {
3939
"message": "Uh oh, it looks like your code won't run. Here's the error message we're getting"
4040
},
4141
'f_no_alert': {
42-
'message': "You didn't call the alert method! Try typing `alert();` in the console.",
43-
'hint': 'Call the alert method by typing the following: `alert();`'
42+
'message': "You didn't call the alert function! Try typing `alert();` in the console.",
43+
'hint': 'Call the alert function by typing the following: `alert();`'
4444
}
4545
};
4646

4747
module.exports = {
4848
'id': 2,
49-
'title': 'Methods',
49+
'title': 'Functions',
5050
'instructions': `Great job, {{username}}! In JavaScript, when we surround a word with quotes it's called a *string*, and when we're done with a line of code we finish it with a semicolon.
5151
52-
JavaScript also has built-in features, called *methods*. In order to call a method, we simply write its name (this time without quotes) and end it with a set of parentheses. Try calling the \`alert\` method as you see below.
52+
JavaScript also has built-in features, called *functions*. In order to call a function, we simply write its name (this time without quotes) and end it with a set of parentheses. Try calling the \`alert\` function as you see below.
5353
5454
Don't be afraid when a box pops up — that's your code working, {{username}}!
5555
5656
<code class=\"inlineCode inlineCode--btn\">alert();</code>`,
5757
'hints': [
58-
'Call the alert method by typing the following: `alert();`'
58+
'Call the alert function by typing the following: `alert();`'
5959
],
6060
'tests': tests,
6161
'failures': failures,

courses/intro/3_string_method_parameter.js renamed to courses/intro/3_string_function_parameter.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ failures = {
5757
"message": "Uh oh, it looks like your code won't run. Here's the error message we're getting"
5858
},
5959
'f_no_alert': {
60-
'message': 'You can call the alert method like this: `alert();`'
60+
'message': 'You can call the alert function like this: `alert();`'
6161
},
6262
'f_no_alert_val': {
6363
'message': "Here's a sample name to see how it works: `alert(\"Taylor\");`"
@@ -66,20 +66,20 @@ failures = {
6666
'message': "You passed your name, but you didn't pass it as a string. Try adding quotes around it, like this: `\"Johnny\"`"
6767
},
6868
'f_string_not_passed': {
69-
'message': 'Make sure you pass a string, like `"Johnny"`, into the `alert` method.'
69+
'message': 'Make sure you pass a string, like `"Johnny"`, into the `alert` function.'
7070
}
7171
};
7272

7373
module.exports = {
7474
'id': 3,
75-
'title': 'String Method Parameter',
75+
'title': 'String Function Parameter',
7676
'instructions': `Nice pop-up box, {{username}}, but there wasn't much in it. How can we get that box to show your name?
7777
78-
Well, many methods (like the \`alert\` method) can take instructions, which we call *parameters*. By sending a string into the \`alert\` method, we can put text on the pop-up box. Try it!
78+
Well, many functions (like the \`alert\` function) can take instructions, which we call *parameters*. By sending a string into the \`alert\` function, we can put text on the pop-up box. Try it!
7979
8080
<code class=\"inlineCode inlineCode--btn\">alert("{{username}}");</code>`,
8181
'hints': [
82-
"Type in your first name surrounded by double quotes inside the alert method: `alert(\"{{username}}\");`"
82+
"Type in your first name surrounded by double quotes inside the alert function: `alert(\"{{username}}\");`"
8383
],
8484
'tests': tests,
8585
'failures': failures,

courses/intro/6_numbers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('set_a_var', function(){
4747

4848
failures = {
4949
'f_no_alert': {
50-
"message": "You didn't call the alert method! Try typing `alert();` in the console."
50+
"message": "You didn't call the alert function! Try typing `alert();` in the console."
5151
},
5252
'f_no_alert_val': {
5353
'message': "Here's a sample name to see how it works: `alert(42);`"
@@ -62,7 +62,7 @@ module.exports = {
6262
'title': 'Numbers',
6363
'instructions': `Great! Notice how your name printed out on the screen below, showing you the value inside the variable.
6464
65-
So far we have only worked with 1 value type (strings), but JavaScript has many! Another example of a value type is a number. Pass any number of your choosing into the alert method. Just like a method, a number does not get quotations.
65+
So far we have only worked with 1 value type (strings), but JavaScript has many! Another example of a value type is a number. Pass any number of your choosing into the alert function. Just like a function, a number does not get quotations.
6666
6767
<code class=\"inlineCode inlineCode--btn\">alert(42);</code>`,
6868
'tests': tests,

courses/intro/8_combining_strings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ failures = {
5656
"message": "Uh oh, it looks like your code won't run. Here's the error message we're getting"
5757
},
5858
'f_no_alert': {
59-
'message': 'You can call the alert method like this: `alert();`'
59+
'message': 'You can call the alert function like this: `alert();`'
6060
},
6161
'f_no_alert_val': {
6262
'message': "Your alert message should look like this: `alert(firstName + \" is awesome!\");`"

courses/intro/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ var path = require('path');
33

44
challenges = [
55
'1_string',
6-
'2_methods',
7-
'3_string_method_parameter',
6+
'2_functions',
7+
'3_string_function_parameter',
88
'4_variables',
99
'5_variable_value',
1010
'6_numbers',

0 commit comments

Comments
 (0)