JSFiddle - React, Tailwind, and code Playground

HTML

<span id="myTest">test</span>

JavaScript

function hof ($el) {
    $.fn.text.call($el, 'test1')
}

function hof2 (setter) {
    //setter.call(window.jQuery, "not test 2");
}

var span = $("#myTest");
hof(span);
hof2(span);