JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" value="test1">Test1
<br>
<input type="checkbox" value="test2">Test2
<br>
<input type="checkbox" value="test3">Test3
<br>
<input type="checkbox" value="test4">Test4
<br>

JavaScript

$("input[type=checkbox]").click(function() {
  if ($(this).val() == "test2" && !$(this).is(":checked")) {
    alert("Unchecked Test2");
  }
});