🔰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 nameonly function expression can be anonymous.
function declarations must have a name.
what is a function declaration?
Last updated
Was this helpful?