- Feature Articles
-
CodeSOD
- Most Recent Articles
- The Update Route
- One Case
- Joined Up
- Three Minutes
- Preformatted
- Development Tools
- The Barren Fields
- Completely Readable
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
what language is that code?
function() => { }is not legal js or php as far as i know, either you use() => { }orfunction() { }without the arrow. might just be a typo but its wierdAdmin
It's Javascript, and as far as I'm concerned, JS in the backend is the real WTF. I would say: how could this not have happened at some point?
Admin
Pretty sure there's just a missing )
Edit Admin
it's not valid JavaScript. Traditional function syntax is
function(params) { body }, ES6 arrow function syntax is(params) => { body }. You can't have both thefunctionkeyword and=>.But other than that it looks like pretty normal Node.js using the Express framework.