Not the OP, and I would've phrased the comment a little less strongly. However, I'm a full stack engineer who came up from the front-end engineering ranks, and I've successfully gone through two major tech switches (desktop -> web and web -> mobile).
The specific tech stack you use as a frontend engineer will almost certainly be obsolete in 5 years. The general skills you learn as a frontend engineer will not be, and that combination of skills are not taught anywhere, particularly not college.
If you're doing it right, you learn way more as a FE-SWE than just Javascript. You learn design concepts like hierarchy, line, typography, color theory, etc. You learn information architecture and how to present only what the user needs to see at a given time to them. You learn how to structure a large application through MVC, MVP, component trees, etc. You learn how to keep it responsive and low-latency. You learn concurrency and how to deal with user interactions that may occur in the middle of your app doing something. You learn animation and motion design. You learn security, input validation, never to trust user input, and how to design the UI so that invalid inputs aren't even possible.
Those are widely transferrable skills. As long as there are computers and people who use them, we'll need to figure out how to interface between them. And as more fundamental CS concepts become available to mainstream, non-tech-savvy users, the need for frontend engineering skills only becomes greater (witness companies like GitHub, DropBox, and Twitter, which are based upon bringing UNIX utilities that have existed for 40 years to mainstream audiences).
I loved my compiler design and machine architecture courses, but demand for those skills is very specialized, and you have to be very good at it to get a job doing them. I'm actually one of the lucky ones who has used my compiler skills in a large corporation, but honestly frontend engineering has opened up many, many more doors for me.