Question : for scala example
Answered by : confused-crab-zbyetazvk04b
object Demo { def main(args: Array[String]) { var a = 0; // for loop execution with a range for( a <- 1 to 10){ println( "Value of a: " + a ); } }
}
Source : https://www.tutorialspoint.com/scala/scala_for_loop.htm | Last Update : Mon, 11 Jul 22