-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathindex.js
More file actions
36 lines (28 loc) · 1.32 KB
/
index.js
File metadata and controls
36 lines (28 loc) · 1.32 KB
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
// 1. Add function code goes here
exports.add = function add() {};
// 2. Multiply function code goes here
exports.multiply = function multiply() {};
// 3. OddOrEven function code goes here
exports.oddOrEven = function oddOrEven() {};
// 4. Write a function that returns an array that includes number 1 to 100
// Ex: [1,2,3,4, ..., 99, 100]
exports.arrayGenerator = function arrayGenerator() {};
// 5. Fix this function. We want to see 2 in the console instead of undefined
exports.hoisting = function hoisting() {
console.log(y); // undefined
let y = 2;
};
// 6. Write a function that accepts unlimited amount of numbers as input
// and return the smallest value
exports.minValue = function minValue() {};
// 7. Write a function that accepts an array of numbers as input
// and return a new array with all numbers doubled
// Ex: [1,2,3] => [2,4,6]
exports.doubleArray = function doubleArray() {};
// 8. We have an array of students object, each object will have a name property
// write a function that accepts a student array as first parameter, and a name as second parameter
// and return the student with that name
// Example of student array: const students = [{ name: 'a' }, { name: 'b' }];
exports.findStudentName = function findStudentName() {};
// 9. Transform all of the above into arrow functions below here
// hey was up ?