You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You have two arrays: arrSearch and arrTake. arrSearch has to be sorted in reverse alphabetical order. Now, from arrSearch extract the third element, and from that element select the third letter. If the letter you selected matches the first letter of one or more elements of arrTake, return the first element that starts with the respective letter. If there is no element to match in the second array then return 'Nothing here'.
*/
function select (arrSearch, arrTake){
//arrSearch sorted ub reverse alphabetical order
//take 3rd letter from 3rd element
//if letter === first letter of one or more elements in arrtake
//return first elelment rhat starts with said letter
//if none, return nothing here
const matchLetter = arrSearch.sort((a, b) => b.localeCompare(a))[2][2]