JSFiddle - React, Tailwind, and code Playground
by Egli
HTML
Result X: <span id='resultX'></span><br />
Result Y: <span id='resultY'></span><br />
Result Combined: <span id='resultCombined'></span>
JavaScript
//On Dom ready
$(function(){
var pcX = 100;
var pcY = 150;
//is it within the boundaries of the given box?
var resultX = pcX >= 78 && pcX <= 303;
var resultY = pcY >= 17 && pcY <= 270;
var resultCombined = ((pcX >= 78 && pcX <= 303) && (pcY >= 17 && pcY <= 270));
//Print out the boolean operation results
$('#resultX').html(resultX.toString());
$('#resultY').html(resultY.toString());
$('#resultCombined').html(resultCombined.toString());
});