JSFiddle - React, Tailwind, and code Playground
JavaScript
function func(a,b,c) {
console.log(a,b,c);
return '';
}
var t1 = 'testing'.replace(/e/, func); // works
console.log('t1 = ' + t1);
var t2 = 'testing'.replace(/e/, func.call); // doesn't work
console.log('t2 = ' + t2);