Skip to content

Instantly share code, notes, and snippets.

View andreiskandar's full-sized avatar
🎯
Focusing

Andre Iskandar andreiskandar

🎯
Focusing
View GitHub Profile
@andreiskandar
andreiskandar / gist:86e9974203f76930173b044a6133c730
Created June 30, 2020 19:15
Sum two largest numbers in the array
/*
In this exercise, we will be given an array of 2 or more numbers.
We will then have to find the two largest numbers in that array, and sum them together.
Input
const sumLargestNumbers = function(data) {
// Put your solution here
};
console.log(sumLargestNumbers([1, 10]));