I\'m trying to set a class to active depending on the url. I\'m trying to use the code below, but in every case, it activates the active class for the second tab.
if(pathname = '/learn/subsection2') { // assignment
if(pathname == '/learn/subsection2') { // test for equality
if(pathname === '/learn/subsection2') { // test for equality without type coercion