How to check the value of a variable
The problem I have is that a value of a variable is blanc but it's not "" or " " or Null. I tried to print the value:
Nothing is printed. If I remove the getrouteDest3 "hh" is printed. How can I check the value of getrouteDest3 if nothing is printed?
document.write("h" . getrouteDest3 . "h");
You're using the PHP method of appending strings together (.).
document.write("h" + getrouteDest3 + "h");
thanks, I checked the variable with typeOf and it is a "string". Is null a string or another type?
Originally Posted by bionoid
Can it be other than "" or " "?
Don't understand this...
Originally Posted by md7dani
If you use the typeof operator on null you'll get object. This means that null is a special object value which indicates "no object". Null is typically regarded as a special value of its own type that indicates no value, unknown value or missing value...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)