Skip to content

Commit c700b0e

Browse files
committed
saving my initial progress on this studio
1 parent 46bed66 commit c700b0e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

functions/studio/studio-functions.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
// Part One: Reverse Characters
44

55
// 1. Define the function as reverseCharacters. Give it one parameter, which will be the string to reverse.
6+
let arr = [ 'hello', 'world', 123, 'orange'];
7+
let newArr = '';
8+
9+
arr.reverse();
10+
console.log(arr);
11+
12+
newArr = arr.join('');
13+
console.log(newArr);
14+
15+
16+
17+
618
// 2. Within the function, split the string into an array, then reverse the array.
719
// 3. Use join to create the reversed string and return that string from the function.
820
// 4. Below the function, define and initialize a variable to hold a string.

0 commit comments

Comments
 (0)