14.06.2015 Views

Scala Tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

for( var x scala Test<br />

value of a: 1<br />

value of a: 2<br />

value of a: 3<br />

value of a: 4<br />

value of a: 5<br />

value of a: 6<br />

C:/><br />

The for Loop with Filters<br />

<strong>Scala</strong>'s for loop allows to filter out some elements using one or more if statement(s). Following is the syntax of for<br />

loop along with filters.<br />

for( var x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!