Why isn't the title info1 and li the same? How can I make them the same?
Why isn't the title info1 and li the same? How can I make them the same?
because li is a DOM, not a string, using innerHTML for get string from tag html
try console.log(titleinfo[1]==li.innerHTML) on line 446