how to check if object is undefined in javascript

JavaScript
if (typeof something === "undefined") {
    alert("something is undefined");
}
Source

Also in JavaScript: