javascript check if not undefined

JavaScript
if (typeof myVar !== "undefined") {
    console.log("myVar is DEFINED");
}
Source

Also in JavaScript: