FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Mastering call, apply, and bind
NewsWeb Development

Mastering call, apply, and bind

via Dev.to TutorialRizwan C1mo ago

Understanding call , apply , and bind is essential if you want to truly master this (JavaScript function context). In JavaScript, the value of this depends on how a function is called, not where it is defined. const user = { name : " Jon " , job : " engineer " intro () { console . log ( ` ${ this . name } is ${ job } ` ); } }; user . intro (); // Jon is engineer But what if we want to use greet for another object? That’s where call , apply , and bind come in. call() - invokes function immediately and allows you to pass arguments individually. apply() - similar to call() , but it accepts arguments as an array. bind() - Unlike call and apply , bind() does NOT execute immediately . It returns a new function with this permanently bound. call() call() method invokes a function immediately. It takes the object you want to use as this as the first argument, followed by individual arguments for the function. const user1 = { name : " Jon " }; const user2 = { name : " Ron " }; function intro ( j

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
18 views

Related Articles

.GUI
News

.GUI

Medium Programming • 4d ago

This NEW Smart Trend Indicator Finds Accurate Buy & Sell Levels (TradingView)
News

This NEW Smart Trend Indicator Finds Accurate Buy & Sell Levels (TradingView)

Medium Programming • 4d ago

Dev.to CDP Publish Check 20260328-105905
News

Dev.to CDP Publish Check 20260328-105905

Dev.to • 4d ago

Concurrency, What does that even mean, what are they talking about…?
News

Concurrency, What does that even mean, what are they talking about…?

Medium Programming • 4d ago

Most of the work that matters… no one will ever see.
News

Most of the work that matters… no one will ever see.

Medium Programming • 4d ago

Discover More Articles