Posted 10 September 2013 - 08:58 PM
I want to make a program that will read from a file and make a list using what is on that file. So if I had this on the file:
I have no idea how I can do this.
Help is appreciated!
Thanks! :D/>
test
test1
test2
it would print out:
>test
>test1
>test2
So I have two problems that are caused by each other. I want to add that little ">" to the front in a different than the actual words. I could just add it to the beginning of the words in the file it reads from but I don't know how I could get it to be a different color then. I think I want to use fs.readAll() because I want to be able to add as many things to the list as I want, so I can't just turn them all into different variables using fs.readLine() and add the ">" to them. I have no idea how I can do this.
Help is appreciated!
Thanks! :D/>