In C++ or Java, line = readLine() would return the line itself, however, in Scala, assignment to var type variable returns () i.e. Unit, so it cannot be compared to "" in a while loop.
Pure functional languages do not have loops because of this same reason, it does not return anything
Pure functional languages do not have loops because of this same reason, it does not return anything