You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
info.textContent = 'Below is a dynamic list. Click anywhere outside the list to add a new list item. Click an existing list item to change its text to something else.';
document.body.appendChild(info);
document.body.appendChild(list);
html.onclick = function() {
var listItem = document.createElement('li');
var listContent = prompt('What content do you want the list item to have?');
listItem.textContent = listContent;
list.appendChild(listItem);
listItem.onclick = function(e) {
e.stopPropagation();
var listContent = prompt('Enter new content for your list item');