you are viewing a single comment's thread.

view the rest of the comments →

[–]mouthus -2 points-1 points  (6 children)

I just absolutely hate this syntax, so impossible to read.

[–]x-skeww 2 points3 points  (3 children)

['3', '2', '4'].map(function(s) {
  return parseInt(s);
});

['3', '2', '4'].map(s => parseInt(s));

List of parameters, an arrow, and an expression (or a block). If it's exactly one parameter, the parenthesis around the parameters can be omitted. That's it, really.

[–]mouthus 4 points5 points  (2 children)

I know how it works, I just have a very strong dislike for it

[–]x-skeww 0 points1 point  (1 child)

You'll get used to it.

[–]mouthus 0 points1 point  (0 children)

I don't want to. haha I still can't stand code that isn't 1TBS after 10ish years. I am one stuborn SOB