function skl() {
var trct = 100;
var amt = 100;
while (amt == trct)
{
funk();
amt += 50;
trct = counttr();
}
console.log(amt, friendct);
};
Initially there are 100 <tr>s
funk() scrolls down to reveal 50 more <tr>s
counttr() counts the amount of TRs and returns the amount.
The point of the function is to scroll down until their is no more TRs. When there are no more <tr>s the function will still add 50 to amt but counttr() wont add 50, so when the for loop evaluates the numbers will no longer be equal to each other and the loop ends.
Edit - The loop only runs once and displays "100 150" meaning the value of trct didn't change.
whilestatement would fit your needs better, I think."150 100", not"100 150", right? If so, yourcounttrfunction reports an incorrect value. Either that, orfunkfails to add more TRs.counttr()function would be interesting.