1
The function below is rendering all user names, I need to include in it a way to filter the rendered users according to what is typed in an input text, I tried to use includes() but I’m not getting, as I could apply it in this function???
function renderFoundUsers() {
let foundUsersHTML = `<div>`;
foundUsers.filter((user) => {
const { name } = user;
const userHTML = `
<div>
<ul>
<li>${name}</li>
</ul>
</div>
`;
foundUsersHTML += userHTML;
});
foundUsersHTML += `</div>`;
tabfoundUsers.innerHTML = foundUsersHTML;
}