Like let's say you have a function like
function variableFunTime(varname){
console.log("I ran a function, even if the variable was bad");
};
and you have the variables
var aValidVar = "123";
var aValidVar2 = "456";
and you run the function like
variableFunTime(NopeNotValid);
A use case for this maybe would be a function to check whether or not a variable exists or something, but it seems impossible to even reference an invalid variable without just getting a ReferenceError and the function never running.
function IsThisAValidTicket(ticket){
//check if ticket exists and return false if not
}
The reason other questions that have been marked as the same as this are different is that the solutions defined from them don't work inside functions