JSFiddle - React, Tailwind, and code Playground

HTML

<p id="output"></p>

CSS

body {
    font-family: 'Segoe UI', Sans-Serif;
}

JavaScript

var oneFunc = function (greeting) {
    $('#output').html(greeting);
};

Function.prototype.enhance = function (next) {
    var old = this,
        i = 2,
        args = [];
    
    for (; i < arguments.length; i++) {
        args.push(arguments[i]);
    }
    
    return function () {
        var i = 0,
            // Unlink the two arrays.
            use = args.slice(0);
       
        for (; i < arguments.length; i++) {
            use.push(arguments[i]);
        }
        
        old.apply(null, use);
        next.apply(null, use);
    };
};

var oneFunc = oneFunc.enhance(function (greeting) {
    $('output').innerHTML += " there.";
});

oneFunc('Hey');