Camille Posted on Mar 21, 2022 • Edited on Mar 21, 2022 Working with the DOM in javascript - substring comparisons? #codepen #javascript #beginners #help 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) Subscribe Submit Preview Dismiss Collapse Expand Camille Camille Camille Follow I never know what to write in these things. I should probably spend some time coming up with some snippets about me. I am not new to front end coding, but I am severely rusty. Location Saint Robert, Missouri Joined Feb 12, 2022 • Mar 21 '22 Dropdown menu Copy link Hide I figured it out myself. Sort of. String.substring() doesn’t behave the way I expected it to. String.includes(substring) does the job. Code of Conduct • Report abuse
Top comments (1)
I figured it out myself. Sort of. String.substring() doesn’t behave the way I expected it to. String.includes(substring) does the job.