JSFiddle - React, Tailwind, and code Playground
HTML
t must have a['test']
s must NOT have a['test']
JavaScript
var s = {
a: [],
add: function(s) {
this.a.push(s);
}
}
var t = $.extend({}, s);
t.add('test');
console.log(t);
console.log(s);