Why when I click on my buttons there are always 100 in console log? And how I can fix this?
function SampleFunction(param){
    console.log(param);
}
for (i = 0; i < 100; i++) {
    $("#btn-" + i).on('click',function(e){
        SampleFunction(i);
    });
}
 
     
    