About 50 results
Open links in new tab
  1. Check if a variable is a string in JavaScript

    How can I determine whether a variable is a string or something else in JavaScript?

  2. How can I check if a var is a string in JavaScript?

    possible duplicate of Check whether variable is number or string in javascript – Jonathan Hall Aug 21, 2015 at 20:12 This is also a duplicate of Check if a variable is a string in JavaScript – Alf Eaton Sep …

  3. How can I test whether a variable has a value in JavaScript?

    Mar 5, 2009 · The values null and undefined are legitimate values you can assign to a variable... The String function split() always returns an array so use the length property of the result to figure out …

  4. Check whether variable is number or string in JavaScript

    Aug 20, 2009 · Does anyone know how can I check whether a variable is a number or a string in JavaScript?

  5. javascript - how to detect if variable is a string - Stack Overflow

    Feb 3, 2011 · Yes, it will get coerced into a string via Object 's toString method, but the fact remains that new String('some string') is not a string, in and of itself. typeof someString === "string" is the correct …

  6. Easy way to check if a variable is a string? - Stack Overflow

    Sep 4, 2012 · jQuery just uses typeof s === "string" when checking the types of passed in arguments. I suspect this normally works just fine because it's rare for someone to explicitly code a string object …

  7. How do I check for an empty/undefined/null string in JavaScript?

    Is there a string.Empty in JavaScript, or is it just a case of checking for ""?

  8. jquery - How to check if a variable is null or empty string or all ...

    Apr 19, 2012 · How to check if a variable is null or empty string or all whitespace in JavaScript? Asked 13 years, 10 months ago Modified 1 year, 3 months ago Viewed 203k times

  9. Is there a standard function to check for null, undefined, or blank ...

    Apr 1, 2011 · Is there a universal JavaScript function that checks that a variable has a value and ensures that it's not undefined or null? I've got this code, but I'm not sure if it covers all cases: …

  10. What is the correct way to check for string equality in JavaScript ...

    So the best way to check for equality is using the === operator because it checks value as well as type of both operands. If you want to check for equality between two objects then using …