DEV Community

Discussion on: Working with the DOM in javascript - substring comparisons?

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.