-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
43 lines (34 loc) · 939 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import {
diffArray,
myReplace,
seekAndDestroy,
sumAll,
whatIsInAName,
spinalTapCase,
translatePigLatin,
missingLetter
} from './freecodecamp-algorithm-questions';
import {
findAnagram
} from './miscellaneous-code-snippets';
import {
sumSquareDifference
} from "./freecodecamp-algorithm-questions/project-euler";
console.log(sumAll([1, 4]));
console.log(diffArray([1, 2, 3, 4, 5], [1, 2, 3, 5, 6]));
console.log(seekAndDestroy([1, 2, 3, 1, 2, 3], 2, 3));
console.log(whatIsInAName(
[
{ 'apple': 1, 'bat': 2 },
{ 'apple': 1 },
{ 'apple': 1, 'bat': 2, 'cookie': 2 },
{ 'bat': 2 }
],
{ 'apple': 1, 'bat': 2 }
));
console.log(spinalTapCase('Teletubbies say Eh-oh'));
console.log(translatePigLatin('algorithm'));
console.log(findAnagram('tar', 'rat'));
console.log(myReplace("Let us go to the store", "store", "mall"));
console.log(missingLetter("abce"));
console.log(sumSquareDifference(10));