๐ฐanonymous function
๐ง ๆฝๅทฅไธญ
JS โฉ value โฉ function โฉ name โฉ anonymous function
a function without a function name.
// โญ๏ธ anonymous functions
// โญโโโ ๐ธ โโโโฎ
(function(){}); // function expression
// โญ๏ธ Note: "()" are requiredโ๏ธ
// โญโ ๐ธ โโฎ
() => {}; // arrow function
// โญ๏ธ Note:
// function declaration, can't be anonymousโ๏ธ
function(){}
// โ SyntaxError: Function statements require a function name
Last updated
Was this helpful?