Sobes.tech
Junior — Senior

Get the three longest words from the headline and format them as hashtags

livecode

Task condition

Given: a string - article title. You need to select three words of maximum length from it (digits ignored) and turn each into a hashtag, adding the "#" symbol at the beginning. Implement a function that returns an array of such hashtags, sorted in descending order by the length of the original words. All hashtags should be in lowercase.

Examples Input: "Visualizing Science" Output: ["#visualizing", "#science"]

Input: "How the Avocado Became the Fruit of the Global Trade" Output: ["#avocado", "#became", "#global"]