JSFiddle - React, Tailwind, and code Playground

by Artem

HTML

<div id="root">1
  <div>2
    <div>4</div>
  </div>
  <div>3</div>
  <div>5
     <div>6</div>
   </div>
</div>

JavaScript

const tree = document.getElementById('root')

const func = (el) => {
		if(el.children) {
    	el
    }
}