1
1
Functions are very powerful.
2
2
3
- * You can write more than one line of code inside of functions.
4
- * You can use variables inside of functions.
5
- * You can call other functions inside of functions!
3
+ - You can write more than one line of code inside of functions.
4
+ - You can use variables inside of functions.
5
+ - You can call other functions inside of functions!
6
6
7
7
``` js
8
8
function getAgeInDays (age ) {
@@ -19,9 +19,9 @@ function createCreeting(name, age) {
19
19
20
20
## Exercise 1
21
21
22
- * In ` exercise.js ` write a program that displays the percentage of students and mentors in the group
23
- * The percentage should be rounded to the nearest whole number (use a search engine to find out how to this with JavaScript)
24
- * You should have one function that calculates the percentage, and one function that creates a message
22
+ - In ` exercise.js ` write a program that displays the percentage of students and mentors in the group
23
+ - The percentage should be rounded to the nearest whole number (use a search engine to find out how to this with JavaScript)
24
+ - You should have one function that calculates the percentage, and one function that creates a message
25
25
26
26
> Consider: should your percentage function do the rounding, or should it be done when the greeting is created?
27
27
@@ -34,9 +34,9 @@ Percentage mentors: 35%
34
34
35
35
## Exercise 2
36
36
37
- * In ` exercise2.js ` you have been provided with the names of some mentors. Write a program that logs a shouty greeting to each one.
38
- * Your program should include a function that spells their name in uppercase, and a function that creates a shouty greeting.
39
- * Log each greeting to the console.
37
+ - In ` exercise2.js ` you have been provided with the names of some mentors. Write a program that logs a shouty greeting to each one.
38
+ - Your program should include a function that spells their name in uppercase, and a function that creates a shouty greeting.
39
+ - Log each greeting to the console.
40
40
41
41
## Expected result
42
42
0 commit comments