cara memeriksa apakah objek tidak terdefinisi dalam javascript
if (typeof something === "undefined") {
alert("something is undefined");
}
Mobile Star
if (typeof something === "undefined") {
alert("something is undefined");
}
if (typeof myFlag !== "undefined") {
// comes here whether myFlag is true or false but not defined
}