JSFiddle - React, Tailwind, and code Playground
by edith_tang
HTML
<div id="app1">
</div>
<div id="app2">
{{ reversedText }}
</div>
JavaScript
var app1 = new Vue({
el: '#app1',
data: {
text: '123,456'
}
});
var app2 = new Vue({
el: '#app2',
computed: {
reversedText: function() {
return app1.text.split(',').reverse().join(',');
}
}
})