Get rid of trailing comma in `onclick` attribute