slipperyfish Posted March 30, 2006 Share Posted March 30, 2006 how do you check if a variable exsists in javascript?i no in PHP you can use:[code]isset($var)[/code]is there something similar in javascript? Link to comment https://forums.phpfreaks.com/topic/6166-checking-if-var-exsists/ Share on other sites More sharing options...
wildteen88 Posted March 31, 2006 Share Posted March 31, 2006 Javascript doesnt have a pre built in function like isset. If want to check variable you'll have to do it like this:[code]if(varName != ""){ //then do something here}else{ //do something else here}[/code] Link to comment https://forums.phpfreaks.com/topic/6166-checking-if-var-exsists/#findComment-22588 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.