Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
tntn
· 7y ago · 0 comments
What is the syntactic sugar here? I mostly see a map that doesn't behave how anyone would expect.
Comments
[–]
JoeNr76
7y 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.)
[–]
zbentley
7y ago
Optional/defaulted function arguments are an extremely useful feature of many programming languages; are you arguing that they are always harmful?
[–]
JoeNr76
7y ago
Point me in my remark where I said that they are harmful. I was answering the question what the syntactic sugar was.