Settings

Theme

The Invention of the Function Keyword

maartenhus.nl

1 points by MrHus 3 years ago · 2 comments

Reader

compressedgas 3 years ago

> Now why do people use const lambdas when there is a perfectly fine function keyword?

Because the hoisting of functions introduces mutable variables. The rule for variables is that everything should be const unless it is meant to be reassigned and then you use let.

MrHusOP 3 years ago

I have a pet peeve: I find it annoying when someone uses "const lambda" to define named functions instead of using the "function" keyword.

I thought I'd air my grievances to the world.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection