Create a unique function using the array provided below to find and store the longest name. Then, save that name in a variable called longest_name and print it out using another variable named answer.
let array = [ "John", "Lee", "Smitty", "Cyren", "Linda", "Bart", "Jason", "Wilson", "Travis", "Newt"];
Is this an example of how the function would look like?
let array = [ "John", "Lee", "Smitty", "Cyren", "Linda", "Bart", "Jason", "Wilson", "Travis", "Newt"];
let result = array.filter(val => includes(val));
console.log(result);