Hi,
You can use for loop in scala using this code below:
scala> for (i <- 1 to 5)println(i)

And also you can do the reverse of this by using this code:

Just you need to add by -1 in that particular code and you can see the result in a reverse manner.