Tips & Tutorials

3 Ways To Do Case Insensitive String Comparison In Javascript

Welcome to a quick tutorial on how to do case-insensitive string comparison in Javascript. By default, the == comparison operator in Javascript is case-sensitive. Just how can we do a case-insensitive comparison in Javascript then? The common ways to do a case-insensitive string comparison in Javascript are: Change both strings to lowercase – if (FIRST.toLowerCase()

3 Ways To Do Case Insensitive String Comparison In Javascript Read More »