JSFiddle - React, Tailwind, and code Playground

by shivaay123

JavaScript

let worker1 = { name: 'Oli', email: 'leo@gmail.com' };
let worker2 = { name: 'Kp', email: 'nat@hotmail.com' };
function invite(text) {
   console.log(`${text} ${this.name}`);
}
let helloOli = invite.bind(worker1);
let helloKp = invite.bind(worker2);
helloOli('Hello');
helloKp('Hello');