How would I translate the following Java backward counting loop into Scala?

Viewed 2412

The following Java code is a very simple piece of code, but what are the equivalent constructs in Scala?

for (int i=10; i> 0; i-=2) {
    System.out.println(i);
}
3 Answers
Related