| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/in | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
in true .
in ;
in .
//
var trees = new Array("redwood", "bay", "cedar", "oak", "maple");
0 in trees; // true .
3 in trees; // true .
6 in trees; // false .
"bay" in trees; // false . , .
"length" in trees; // true . length Array() .
//
"PI" in Math; // true .
"P" + "I" in Math; // true .
//
var myCar = {
company: "Lamborghini",
model: "Lamborghini Veneno Roadster",
year: 2014,
};
"company" in myCar; // true .
"model" in myCar; // true .
in . String .
var color1 = new String("green");
"length" in color1; // true .
var color2 = "coral";
"length" in color2; // color2 String .
in in delete false .
var myCar = {
company: "Lamborghini",
model: "Lamborghini Veneno Roadster",
year: 2014,
};
delete myCar.company;
"company" in myCar; // false .
var trees = new Array("redwood", "bay", "cedar", "oak", "maple");
delete trees[3];
3 in trees; // false .
undefined , in true .
var myCar = {
company: "Lamborghini",
model: "Lamborghini Veneno Roadster",
year: 2014,
};
myCar.company = undefined;
"company" in myCar; // true .
var trees = new Array("redwood", "bay", "cedar", "oak", "maple");
trees[3] = undefined;
3 in trees; // true .
in true .
"toString" in {}; // true .
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-relational-operators |
This page was last modified on 2026 7 15 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |