I'm trying to make an if else statement that should disable a button from being pressed when the value of c is 1, but I can't seem to get it to work with d3.js.
HTML
<button type="button" id="bt1" class="bt1">Previous 10</button>
<button type="button" id="bt2" class="bt2">Next 10</button>
JS
d3.select("#bt2").on("click", () => {
    a += 10;
    b += 10;
    c += 1;
    update(a,b,c);
});
d3.select("#bt1").on("click", () => {
    a -= 10;
    b -= 10;
    c -= 1;
    update(a,b,c);
});
if (c = 1) { d3.select("bt1").attr('disabled', 'disabled'); }
 
     
    