shane18 Posted February 14, 2010 Share Posted February 14, 2010 When you do... if(X == 0){ } if I didn't use X in anything before... does X automatically = 0/false like it does in php or does it == NULL? Link to comment https://forums.phpfreaks.com/topic/192003-javascript-variables/ Share on other sites More sharing options...
shane18 Posted February 14, 2010 Author Share Posted February 14, 2010 also, when using arrays must you declare it? Example: var my_new_array = new Array(); is the code above required or can u just go Example: my_new_array[2] = "test"; //OR my_new_array = phone_number.split("-"); Link to comment https://forums.phpfreaks.com/topic/192003-javascript-variables/#findComment-1011994 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.