A
Alan Gutierrez
I'm wondering how I check for a missing argument. I'm creating a
jQuery extension, so maybe there is a best practice specific to
jQuery.
function foo( data, type ) {
if ( type == null ) type = "text"
bar( data, type )
}
Should I be testing for null or undefined?
Alan Gutierrez
jQuery extension, so maybe there is a best practice specific to
jQuery.
function foo( data, type ) {
if ( type == null ) type = "text"
bar( data, type )
}
Should I be testing for null or undefined?
Alan Gutierrez