/explore
|
You are here |
skilldrick.co.uk | ||
| | | | |
syntackle.com
You might be familiar with functions in JavaScript. An IIFE is a special type of function which is invoked implicitly. |
|
| | | | | ||
| | | | |
briankung.dev
[AI summary] An article explains that while Ruby supports some aspects of first-class functions like closures, its handling of anonymous functions and higher-order functions is clunky and less powerful than in languages like JavaScript. |
|
| | | | | ||
| | | | |
jaketrent.com
Arrow functions treat return values in a couple ways. |
|
| | | | | ||
| | | | |
www.hillelwayne.com
What does this print? x = 1 x -> 0 Think it through, then try it in a browser console! Answer and explanation in the dropdown. Show answer It prints 1. wait wtf At the beginning of a line (and only at the beginning of a line), -> starts a comment. The JavaScript is parsed as x=1; x; // 0 The browser then displays the value of the last expression, which of course is 1. |
|
| | | |||