-4

Edit for clarification:

Is there a method to insert code into an alert() or prompt() such as a kind of loop or method of adding data to the alert() or prompt right before running or while running?

-Thanks

user2023185
  • 1
  • 1
  • 3

1 Answers1

1

Do your loop first

for (var n = 0; n<= 50; n++) {varnum1= n*10 - 1;} /*some way to output data tothe alert*/
alert("starting string" + varnum1 + "end of string")
Paul Radich
  • 605
  • 3
  • 9
  • sorry my example doesn't show all cases. I need no limit on the number of varnum1 values to be added to the alert. Even that doesn't matter I want a for loop to take place inside the alert(/* in here*/) – user2023185 Jan 29 '13 at 21:32
  • Your not going to be able to place the loop inside the alert. If you need the logic to take place inside the alert for some reason you could call a function. http://jsfiddle.net/7VUeG/ – Paul Radich Jan 29 '13 at 21:42