You are viewing a single comment's thread. Return to all comments →
Or, using foreach:
foreach
def f(n:Int):Unit = { (1 to n).foreach (_ => println("Hello World")) }
Seems like cookies are disabled on this browser, please enable them to open this website
Hello World N Times
You are viewing a single comment's thread. Return to all comments →
Or, using
foreach
: