About 11,900 results
Open links in new tab
  1. How do I check for an empty/undefined/null string in JavaScript?

    typeof MyVariable == 'undefined' doesn't discern between an initialized variable with an undefined value and an undeclared variable unless the variable was initially declared and initialized to null. Checking …

  2. Is there a way to check for both `null` and `undefined`?

    48 SIMPLE ANSWER Although Typescript is a strongly typed language, it has the same problems with pointers and variables initialization inherited from Javascript. Javascript doesn't check whether a …

  3. How can I check for "undefined" in JavaScript? - Stack Overflow

    If it is undefined, it will not be equal to a string that contains the characters "undefined", as the string is not undefined. You can check the type of the variable:

  4. undefined' is not assignable to type 'string' - Stack Overflow

    Feb 2, 2019 · Alternatively, you can type name1 as string | undefined, and handle cases of undefined further down. However, it's typically better to handle unexpected errors earlier on. You can also let …

  5. c++ - What is an undefined reference/unresolved external symbol error ...

    What are undefined reference/unresolved external symbol errors? What are common causes, and how do I fix and prevent these errors?

  6. python - UnicodeDecodeError: 'charmap' codec can't decode byte X in ...

    UnicodeDecodeError: 'charmap' codec can't decode byte X in position Y: character maps to <undefined> Asked 13 years, 10 months ago Modified 1 year, 3 months ago Viewed 2.0m times

  7. winapi - Undefined reference to WinMain when trying to use …

    Oct 10, 2019 · Undefined reference to WinMain when trying to use wWinMain (C++ MinGW) [duplicate] Asked 6 years, 2 months ago Modified 1 year, 6 months ago Viewed 94k times

  8. How can I check for an undefined or null variable in JavaScript?

    While literally using the keyword undefined, Boolean(undefined) works, trying that with an undefined variable doesn't work, and that is the whole point of doing the check for null or undefined.

  9. What is the difference between null and undefined in JavaScript?

    Feb 22, 2011 · NaN. See for yourself. console.log (null-undefined). The difference between null and undefined is NaN. (Note that this is an attempt at humour, before you flame me for misunderstanding …

  10. How to check undefined in TypeScript - Stack Overflow

    May 1, 2017 · In TypeScript 2, you can use the undefined type to check for undefined values. If you declare a variable as: