uwdata / vsup

Code for generating Value-Suppressing Uncertainty Palettes for use in D3 charts.
https://uwdata.github.io/vsup/
MIT License
77 stars 6 forks source link

Use Arrow Functions #10

Closed p42-ai[bot] closed 3 years ago

p42-ai[bot] commented 3 years ago

Arrow functions are a more concise syntax that can replace the full function syntax in many cases. For example, function(x, y) { return x * y } can be replaced with (x, y) => { return x * y; }.

Arrow functions are slightly different from regular functions, because they do not have bindings to the this, arguments, super or new.target keywords.

Function expressions are only changed to arrow functions when the result is semantically the same and there are no bindings that can affect the execution.