JSFiddle - React, Tailwind, and code Playground

by Dmitry

JavaScript

var obj = {
    test: 1
}

function t( o ){
 o.test = 2;
 return o.test;
}

var obj2 = t(obj);

alert( obj2.test + ' ' + obj.test );