consttext="Create a function to return the longest word(s) in a sentance.";letresult=text.replace(/[^a-zA-Z ]/g,'').split('').sort((a,b)=>{returna.length-b.length;})letlongest=result[result.length-1].lengthresult=result.filter((a)=>{returna.length>=longest})console.log(result)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This could probably be reduced even more: