14.06.2015 Views

Scala Tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

for loop<br />

A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific<br />

number of times. There are various forms of for loop in <strong>Scala</strong> which are described below:<br />

The for Loop with Ranges<br />

The simplest syntax of a for loop in <strong>Scala</strong> is:<br />

for( var x

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

Saved successfully!

Ooh no, something went wrong!