A standard loop...
for (var i = 1; i <= 300; i++) {
expandPack("S" + i);
}
Question
A website only shows some links after clicking on some buttons, but you can trigger these buttons using the js-console of Chrome.
Command:
expandPack('S151')
Basically, the only thing that changes to get the other links is the number (in the example 151)
So how can I use a for loop to get all links with the ids 1-300?
Solution
A standard loop...
for (var i = 1; i <= 300; i++) {
expandPack("S" + i);
}
OTHER TIPS
Are you saying you want to do this:
for(var i = 1; i <= 300; i += 1) {
expandPack('S' + i);
}