Y
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
JoeNr76
2550 days ago
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.)
link
zbentley
2550 days ago
Optional/defaulted function arguments are an extremely useful feature of many programming languages; are you arguing that they are always harmful?
link
JoeNr76
2550 days ago
Point me in my remark where I said that they are harmful. I was answering the question what the syntactic sugar was.
link