JSFiddle - React, Tailwind, and code Playground

by kentaromiura

HTML

<table>
    <tbody>
        <tr><td>A</td><td>B</td></tr>
    </tbody>
</table>
<hr>
    <button id="boom">flip the table</button>

JavaScript

document.getElementById('boom').onclick=function(){
    var table=document.getElementsByTagName('table')[0];
    table.style.direction= table.style.direction == 'rtl'? 'ltr':'rtl';    
}