JSFiddle - React, Tailwind, and code Playground

by juristr

HTML

<div id="out"></div>

JavaScript

var testFunc = function(step){
    var redirectOpts = {
        controller: 'test',
        action: 'step'.concat(step),
        route: ':controller/:action'
    };
    
    return redirectOpts;
};

$(function(){
   var result = JSON.stringify(testFunc(2));
   $('#out').append(result);
});