About 52,500 results
Open links in new tab
  1. What is the correct way to check for string equality in JavaScript ...

    Aug 27, 2010 · There are actually two ways in which strings can be made in javascript. var str = 'Javascript'; This creates a primitive string value. var obj = new String('Javascript'); This …

  2. Optimum way to compare strings in JavaScript? [duplicate]

    you need two compares anyway !, one to see if a > b another to see if they are equal, javascript is VERY fast determining if strings are equal, because, if they are equal they are one and the …

  3. javascript - comparing 2 strings alphabetically for sorting purposes ...

    Apr 17, 2012 · JavaScript compares strings character by character and "a" comes before "b" in the alphabet - hence less than. In your case it works like so - 1 . "a aaa" < " a b" compares the …

  4. how to compare two strings in javascript if condition

    Feb 18, 2017 · Can't get if statement to compare two strings in javascript. 0. Compare two strings in javascript/jquery. 0.

  5. javascript - How to do case insensitive string comparison ... - Stack ...

    Jan 26, 2010 · Javascript seems to use locale "C" for string comparisons so the resulting ordering will be ugly if the strings contain other than ASCII letters. there's not much that can be done …

  6. how to compare two string dates in javascript? - Stack Overflow

    Feb 8, 2013 · Javascript (and MongoDB) is able to compare strings, via simple binary comparison, which means it is comparing every digit, from left to right, and whichever has …

  7. html - Javascript string/integer comparisons - Stack Overflow

    Aug 29, 2022 · Always remember when we compare two strings. the comparison happens on chacracter basis. so '2' > '12' is true because the comparison will happen as '2' > '1' and in …

  8. Compare part of string in JavaScript - Stack Overflow

    Dec 12, 2012 · Compare two strings javascript. 0. compare two strings in javascript. Hot Network Questions Bringing less ...

  9. What is the fastest way to compare strings in JavaScript?

    Comparing strings with a === b is the fastest way to compare string natives. However, if you could create String Objects like new String("test") , re-use those and use those in the comparisons, …

  10. Compare Strings Javascript Return %of Likely - Stack Overflow

    Compare Strings Javascript Return %of Likely. Ask Question Asked 13 years ago. Modified 1 year, 1 month ago.

Refresh