DEV Community

Camille
Camille

Posted on

Working with the DOM in javascript - substring comparisons?

Looking for some help ... I am trying to figure out why my substring test isn't working as I expect it to.

Top comments (1)

Collapse
 
fyrfli profile image
Camille

I figured it out myself. Sort of. String.substring() doesnโ€™t behave the way I expected it to. String.includes(substring) does the job.