Function
Last updated: 2026-09-09
Function Function
Function is the constructor for functions. Functions are first-class citizens.
| Category | Objects |
|---|---|
| ES version | ES1 |
📝 Syntax
function greet(name) { return `Hi ${name}`; }
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
3
function
💡 Tip Function declarations are hoisted.
ℹ️ info Arrow functions have no own this/arguments.
🏷️ Related Objects
💡 Related Cases
More case studies coming soon — check back later.
📚 Related Tutorials
❓ FAQ
QWhat does first-class citizen mean?
AFunctions can be used like values.
QArrow vs regular?
AArrows have no own this/arguments.
QIs Function constructor safe?
ANo — like eval. Avoid.