Scala – For Loop






So what is a loop ?
loops allow us to execute a statement or a block of statements multiple times. Like conditional statements, they are controlled by boolean expressions.

The for comprehension
Scala’s for is much more powerful than Java’s for Consequently, it is used much more often than the other kinds of loops.

Syntax − for loop

Example − for loop

 


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com


Stuff I use to make videos

Windows notebook – http://amzn.to/2zcXPyF

Apple MacBook Pro – http://amzn.to/2BTJBZ7

Desktop - http://amzn.to/2zct252

Microphone – http://amzn.to/2zcYbW1

notebook mouse – http://amzn.to/2BVs4Q3

Screen Recording Software – Camtasia