Skip to content
Learn Netverks

Lesson

Step 16/36 44% through track

arrow-functions

Arrow functions

Last reviewed May 28, 2026 Content v20260528
Track mode
client_javascript
Means
In-browser JS
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Arrow functions—the ideas, syntax, and habits you need before moving on in JavaScript.

Without a solid grasp of Arrow functions, you will repeat mistakes in JavaScript exercises and on real pages or scripts.

You will apply Arrow functions in contexts like: Browsers, Node.js services, edge workers, and tooling ecosystems (bundlers, test runners).

Run JavaScript in the in-browser sandbox, use the terminal output panel, and verify with MCQs.

When the previous lesson's MCQs feel easy and you can explain Arrow functions in your own words.

Arrow functions (=>) are concise. They lexically bind this from surrounding scope—important for callbacks.

Syntax

const double = n => n * 2; — omit braces for single-expression returns.

this binding

Do not use arrows as object methods if you need dynamic this—use regular functions or class methods.

Important interview questions and answers

  1. Q: Arrow as method?
    A: Often wrong—this stays lexical parent, not the object.
  2. Q: Implicit return?
    A: Expression body returns value; block body needs explicit return.

Self-check

  1. Why arrows in array callbacks?
  2. When not use arrow for methods?

Tip: Re-run the playground code for arrow-functions and tweak one line before the MCQs.

Interview prep

Arrow this?

Lexical—inherits enclosing this.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What would you log to verify this behavior?
  • What breaks if you run this before the DOM is ready?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump