I have an array named files:
['Cpp-New.html', 'dirname', 'dirname.html', 'dirname.py', 'HarryPotter', 'Java-New.html', 'poop.css', 'test01.html', 'Web-New.html']
that is being displayed in html. (List)
However, I want to sort it in a way that all elements without a file extension appear at the top. Currently, the browser displays the array in alphabetical order.
How can I achieve this? I tried researching but could not find a solution.
Thank you.