There are a variety of ways, but the following methods seem to be the best.
if($.type(val) === "undefined"){
//Some code goes here
}
- API link of $ .type.
https://api.jquery.com/jQuery.type/
There are a variety of ways, but the following methods seem to be the best.
if($.type(val) === "undefined"){
//Some code goes here
}