import scala.collection.mutable.MutableList
var x = false
while (!x) {
val list = MutableList[Any]()
val input = scala.io.StdIn.readLine("input pls:\n")
list += input
if (input == "end"){ x = true ; println("Bye!"); sys.exit}
if (input =="show") {println(list)}
}
So whenever I run this program and then enter "show" to print the list it only prints out "show" in the list but why not the other input I have done before? What do I have to change in order to store all the input into my list (append) till i type "show" or "end?