-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproblem47.js
More file actions
27 lines (18 loc) · 737 Bytes
/
problem47.js
File metadata and controls
27 lines (18 loc) · 737 Bytes
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
/*
Write an arrow function where it will do the following:**
1. It will take two array inputs
2. Combine the two arrays and assign them in a new array
3. Find the maximum number from the new array and return the
result
Print the result.
problem getting source : https://drive.google.com/file/d/1Ut8t4Ed8V-U0Axtz4nbIXJhmxvMEMUe9/view
*/
const findTheBiggestNumber = (arr1, arr2) => {
const combinationOfTowArr = [...arr1, ...arr2];
const biggestNumberIs = Math.max(...combinationOfTowArr);
return biggestNumberIs;
};
const numberListOne = [10, 20, 30, 50, 512, 101375];
const numberListTwo = [60, 70, 80, 19, 100, 1375];
const result = findTheBiggestNumber(numberListOne, numberListTwo);
console.log(result);