JSFiddle - React, Tailwind, and code Playground

by John Doe

HTML

<div id="map"></div>

JavaScript

if($("#map").length != 0)alert($("#map").length) // возвращает если есть элемент 1 если нет то 0