Question: Implement the function findLongestWord that takes as an argument an array of words and returns the longest one. If there are 2 with the same
Implement the function findLongestWord that takes as an argument an array of words and returns the longest one. If there are 2 with the same length, it should return the first occurrence. Write the JS code in a separate file and html code separate file
use the following array to test your solution: var words = ['mystery', 'brother', 'aviator', 'crocodile', 'pearl', 'orchard', 'crackpott'];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
