Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs check if variable is undefined

if ( typeof query !== 'undefined' && query )
{
  //do stuff if query is defined and not null
}
else
{

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nodejs #check #variable #undefined
ADD COMMENT
Topic
Name
8+4 =