JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" id="a"><label for="a">JQuery ile</label><br>
<input type="text" id="b"><br>
<input type="checkbox" id="c"><label for="c">JQuery olmadan</label>

JavaScript

/*  JQuery ile  */
$("#a").click(function() {
    if($(this).is(":checked")){
        $("#b").val("elma");
    }
    else
    {
        $("#b").val("");
    }
});

/*---------------------------------------*/

/*  JQuery olmadan  */
var c = document.getElementById("c");
var b = document.getElementById("b");
b.onclick = function(e){
  e.preventDefault();
}
c.onclick = function(){
    if(c.checked){
        b.value = "50";
        b.onclick = "";
    }
    else
    {
        b.value = "";
        b.onclick = "";
    }
}