Thanks for the reply gerrikoio !
I'm attaching my 'string' code.
How do I set up the firebase or invoke the store value function to add this data, and further data that is added should be next in index and follows.
I tried storeValue, it worked the first time, but when invoked second time,data was overwritten in db,
and when i used appendValue function, an error was displayed,saying 'no file found to append' and quite understandably.

I chose .txt file as a temporary alternative.