Skip to content

Commit

Permalink
complete SEIR-Flex-0124#7
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunjang1009 committed Feb 2, 2023
1 parent c58e19a commit 45d1d01
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,22 @@ function printPrimes(num) {
return printArray;
// YOUR CODE HERE
}
console.log(printPrimes(10));

// console.log(printPrimes(10));

// 7. printLongestWord
function printLongestWord(arr) {
for (i=0;i<arr.length;i++){
for (j=1;j<arr.length-1;j++) {
if (arr[i].length >= arr[j].length){
return arr[i];
} }
}

// YOUR CODE HERE
}

console.log(printLongestWord(['apple','orange','banana']))

// BONUS!

// 8. eulerFibo
Expand Down

0 comments on commit 45d1d01

Please sign in to comment.