DeveloperBreeze

Javascript Programming Tutorials, Guides & Best Practices

Explore 93+ expertly crafted javascript tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

Tutorial
javascript

Understanding call, apply, and bind in JavaScript

function greet(greeting, punctuation) {
    console.log(greeting + ' ' + this.name + punctuation);
}

const person = { name: 'Alice' };

greet.apply(person, ['Hello', '!']);  // Output: "Hello Alice!"

Here, greet is called with person as the this value, and the arguments are passed as an array.

Aug 30, 2024
Read More