In my code, I have an array of elements. One of those elements is not a string (<a/> element). I want to map through that array and find the element and, replace that element with the string 'error'. Here is the array. How can I achieve what I want?
const arr = ['my', 'array', '<a/>', 'is'];