Create multiple private modules, using Browserify, that perform the following functions.
[ ] 1. One module should load the JSON file and returns the array of objects.
[ ] 1. One module should contain a function that accepts an element id, and the user message, and then add the user's message - along with the delete button - to the specified parent element. Each message should be stored in a private array in this module. This module should also expose a function to read all messages, and delete a single message.
[ ] 1. One module should accept a message element id and then remove the correct element from the DOM. This module should also remove the corresponding message from the private array that was created in the previous module.
Create multiple private modules, using Browserify, that perform the following functions.
id
, and the user message, and then add the user's message - along with the delete button - to the specified parent element. Each message should be stored in a private array in this module. This module should also expose a function to read all messages, and delete a single message.id
and then remove the correct element from the DOM. This module should also remove the corresponding message from the private array that was created in the previous module.