Hacker News new | ask | show | jobs
by tntn 2550 days ago
What is the syntactic sugar here? I mostly see a map that doesn't behave how anyone would expect.
1 comments

The syntactic sugar here is that map and parseInt can be called without specifying all parameters. (But, since JS has no function overloading, it's the same function you're calling.)
Optional/defaulted function arguments are an extremely useful feature of many programming languages; are you arguing that they are always harmful?
Point me in my remark where I said that they are harmful. I was answering the question what the syntactic sugar was.