score:1

Accepted answer

You are only using one =. This results in the c variable having its value affected to 1, it does not test its value.

You can either use 2 or 3 =. See the difference here.

if (c === 1) { d3.select("bt1").attr('disabled', 'disabled'); }

Related Query