How do I "push" something to a variabe in a file using nodeJs?
Coder100 (177)

I would like to "push" an object into my msg.js file:
File content: var m = [{name:"",desc:""}];
I would like to "push": {name:"test",desc:"test"}
New file content: var m = [{name:"",desc:""},{name:"test",desc:"test"}];

You are viewing a single comment. View All
Answered by IbraheemRodrigues (79) [earned 5 cycles]
View Answer