Calculator javascript

I have made this calculator but only AC button works and all other not work. Can anyone tell me what to do so that it can work.

First off, ids MUST be unique. You’ve given every button the same id. AC was just the first one named so it was the only one your click handler could find.

If I change your button definition to <a class="btn btn-danger avi">AC</a> and change your click handler to $('.avi').each(function(index,avi){, then I at least start getting the buttons logged.

Got to go to work now, but that should get you started on the right path.

1 Like

Actually i am new so i don’t know .But I got it now. Thankyou so much it really helped me.
Thanks once again

Everyone makes that mistake at least once.

May be everyone do or not but i got stuck :relieved: