Loop structures: Difference between revisions

Content added Content deleted
(Tern Programming Language)
(Tern Programming Language)
Line 931: Line 931:
Tern has several distinct loop statements.
Tern has several distinct loop statements.


==Infinite Loop==
===Infinite Loop===


<lang tern>let v = 0;
<lang tern>let v = 0;
Line 938: Line 938:
}</lang>
}</lang>


==While Loop==
===While Loop===


<lang tern>let v = 0;
<lang tern>let v = 0;
Line 945: Line 945:
}</lang>
}</lang>


==For Loop==
===For Loop===


<lang tern>for(let v = 0; v < 100; v++) {
<lang tern>for(let v = 0; v < 100; v++) {
Line 951: Line 951:
}</lang>
}</lang>


==For In Loop==
===For In Loop===


<lang tern>for(v in 0 to 99) {
<lang tern>for(v in 0 to 99) {