I’m creating items which are displayed on a page, I do this with:
var popup = "something..."
How can I keep a record of all created popup vars and then manage them via:
- add a new popup var
- remove a popup var
Any clean ways of doing this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Store them in an array, from which you can delete values.
Update
To search and remove a specific element by its value, you can iterate. Recommended: wrap this in a function.