let id;
if(typeof id === 'undefined') {
console.log("id is undefined...");
}
if (t === undefined) {
return 'Undefined value!';
}
if (typeof myVariable === 'undefined'){
//myVariable is undefined
}
if (typeof something != "undefined") {
// ...
}
if(myVar === null) {
console.log("Element is undefined");
}
if (angular.isDefined(var){
//myVariable is undefined
}