JSFiddle - React, Tailwind, and code Playground

by Tushar Jadhav

HTML

<div id="choice"></div>
<div id="hidden">Is number of building blocks a square number?</div>

CSS

#hidden {
    display:none
}

JavaScript

var isSquare = function (n) {
    return Math.sqrt(n) % 1 === 0;;
}


document.getElementById('choice').innerHTML = isSquare(4);