Why wrap everything in an immediately executed function? I see there is an event listener, does this not suffice to kick off the execution of code to build the table?
You wrap it in a function to make sure you don't pollute the global window object. If you don't wrap it in a function then all your variables will be automatically become properties on the window object.
Browsers won't let you write to a csv file unless you're using something like electron to create a "native" app. I'd look into using one of the following: PouchDB, RxDB, LocalStorage, or IndexedDB
Thank you! This is just what I needed
This video was so helpful. Thank you so much!
Why wrap everything in an immediately executed function? I see there is an event listener, does this not suffice to kick off the execution of code to build the table?
You wrap it in a function to make sure you don't pollute the global window object. If you don't wrap it in a function then all your variables will be automatically become properties on the window object.
Thanks,
Is possible to use .csv file as offline database using html and javascript?
if i want to record something very simple in few column.
Browsers won't let you write to a csv file unless you're using something like electron to create a "native" app. I'd look into using one of the following: PouchDB, RxDB, LocalStorage, or IndexedDB
There's a serious issue with naming the variables in your code. Sometimes it's hard to understand them.
thanks