Comment vérifier si l'objet n'est pas défini en 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
}