The while loop syntax is as follows:

while condition {
	doSomething()
}

OR

while(condition) {
	doSomething()
}

The do .. while loop syntax is as follows:

do {
	doSomething()
}
while(condition)

OR

do {
	doSomething()
}
while condition

Twitter Facebook LinkedIn Youtube Slideshare Github