how to solve errors in javascript null or not an object
how to solve errors in javascript null or not an object
Status:
Open Aug 22, 2008 - 12:09 AM
JavaScript
2answers
Answers
Apr 29, 2009 - 10:21 PM
you can use comparison syntax and typeof syntax to do that
say u have the variable called 'myvar'
simply:
to check if its null
if (myvar == null){
//this is null
}
to check if its not an object:
if (typeof myvar != 'object'){
//this is not an object
}
May 21, 2009 - 10:32 PM
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points.
The Quomon Team
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment