paint-brush
The Binding Concept in Javascriptby@sona
399 reads
399 reads

The Binding Concept in Javascript

by sona3mOctober 13th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Javascript binding is done using the Bind() method. With the help of the bind method, we can make one common function and bind different objects, so that the function gives different results when it's needed. The bind() method creates a new function, when invoked, has the this sets to the provided value. In the above example, we are storing a reference of info.printFunc to printFunc2 variable, so calling it without an object reference, so this will now refer to the window (global) object or undefined (in strict mode)

Company Mentioned

Mention Thumbnail
featured image - The Binding Concept in Javascript
sona HackerNoon profile picture
sona

sona

@sona

FrontEnd Developer

About @sona
LEARN MORE ABOUT @SONA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

sona HackerNoon profile picture
sona@sona
FrontEnd Developer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Awesomeopensource