Difference between Do while loop and while wend loop

Answer Posted / remya

The difference between do while and while wend loop .
Do while executes if the condition is true
While wend executes atleast once irrespective of conditions.
Ex:
Do while
Dim x
x=1
Do While x<5
document.write("Welcome.")
x=x+1
Loop

While wend:

Dim x
x=7
Do
document.write("Welcome.")
x=x+1
Loop While x<5

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you reverse a string in vbscript?

831


How to add actions in driver script to run those actions in QTP?

1709


Mention when to use function procedures and what are its characteristics?

832


Mention what is the difference between vbscript and vba?

718


Explain about the asc function?

807


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

789


If else for do while select in vb script?

839


Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.

1789


Mention what is the technology used by vb script?

717


How to Import data from a file (file is on the desktop) to the data table

1749


Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?

3236


What is the main difference between function and sub-procedure?

760


Which loop is used in case of arrays in the vbscript language?

706


How to replace junk code recorded by QTP with a mall function.

1853


What is loose binding? Why is it not a good practice to use it?

853