Automatically highlight current page in menu via Javascript

Whenever one builds a website, one issue is always guaranteed time consuming: highlighting the current page or section in the website with a different style.