Browse - Programming Tips - Have can I compare two strings without being sensitive to case?

Date: 2015nov20
Language: javaScript
Keywords: insensitive, ignore, equalsIgnoreCase

Q.  Have can I compare two strings without being sensitive to case?

A.

function ceq(a, b) { return a.toLowerCase() == b.toLowerCase(); }
Example use:
if (ceq('aPPle', 'Apple')) { alert('They are the same'); } else { alert('They are the different'); }