undefined
Misollar
Qiymatga ega bo‘lmagan o‘zgaruvchi:
let x;
if (x === undefined) {
text = "x is undefined";
} else {
text = "x is defined";
}
O‘zingiz sinab ko‘ring »
let x;
if (typeof x === "undefined") {
text = "x is undefined";
} else {
text = "x is defined";
}
O‘zingiz sinab ko‘ring »
Quyida ko‘proq misollar.
Tavsif
undefined xususiyati o‘zgaruvchiga qiymat berilmaganini yoki u umuman e’lon qilinmaganini bildiradi.
Brauzerlarda qo‘llab-quvvatlash
undefined() — ECMAScript1 (JavaScript 1997) imkoniyati.
U barcha brauzerlarda qo‘llab-quvvatlanadi:
| Chrome | Edge | Firefox | Safari | Opera |
Ko‘proq misollar
Misol
E’lon qilinmagan o‘zgaruvchi:
if (typeof y === "undefined") {
txt = "y is undefined";
} else {
txt = "y is defined";
}
O‘zingiz sinab ko‘ring »
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
