New course! Every coder should learn Generative AI!
Try a free lesson0
create an array, or use dynamic one if available (vector in c++, ArrayList in java, etc) then append each input to that array
ex:
//its js
let arr=[]
while(true){
arr.push(input)
//i know its not possible to get userinput from console in browser, but its just an example.
}