-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunction_loop_array_practice
More file actions
21 lines (11 loc) · 1.17 KB
/
function_loop_array_practice
File metadata and controls
21 lines (11 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// # 1. Create an array to store 5 numbers. Then print out each number on separate lines with a while loop.
// # 2. Write a while true loop that will print the numbers 1 through 100.
// # 3. Write a function that takes in a string and returns the first letter of the string. Then run the function and print the result.
// # 4. Create an array to store 2 numbers. Then print out each number on separate lines with a while loop.
// # 5. Write a while loop that prints the phrase "Around the world" 144 times.
// # 6. Write a function that takes in a string and returns the string repeated 5 times. Then run the function and print the result.
// # 7. Create an array to store 2 strings. Then add one string to the array and print the array on one line.
// # 8. Write a while loop that prints the numbers 0 through 100, increasing by 5 each time.
// # 9. Create an array to store 3 names. Then print out each name on separate lines with a while loop.
// # 10. Write a function that takes in two numbers and returns the first number subtracted by the second. Then run the function and print the result.
SOLUTIONS: https://github.com/TaylorOD/Deliberate_Practice-JavaScript/tree/master/solution_key