JSFiddle - React, Tailwind, and code Playground

by Ebram

JavaScript

var obj = {
    testMethod: function () {
        console.log('function (testMethod): intial output');
    }
}
setInterval(function () {
    obj.testMethod()
}, 1000);
obj.testMethod = function () {
    console.log('function (testMethod): changed output');
}