Skip to content

Commit 824faec

Browse files
committed
added modules section, starter code from exporting-modules walkthrough
1 parent 52b5d60 commit 824faec

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

modules/exporting-modules/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Import the modules exported from practiceExports.js below:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function isPalindrome(str){
2+
return str === str.split('').reverse().join('');
3+
}
4+
5+
function evenOrOdd(num){
6+
if (num%2===0){
7+
return "Even";
8+
} else {
9+
return "Odd";
10+
}
11+
}
12+
13+
function randomArrayElement(arr){
14+
let index = Math.floor(Math.random()*arr.length);
15+
return arr[index];
16+
}

0 commit comments

Comments
 (0)