| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Errors/in_operator_no_object | [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.
TypeError: "in" (edge) TypeError: 'in' , 'x' (Firefox) TypeError: 'in' 'x' 'y' (Firefox, Chrome)
TypeError
in . , .
(, Python), in .
"Hello" in "Hello World";
// TypeError: cannot use 'in' operator to search for 'Hello' in 'Hello World'
"Hello World".indexOf("Hello") !== -1;
// true
null undefinedvar foo = null;
"bar" in foo;
// TypeError: 'in' 'bar' 'foo' (Chrome)
// TypeError: 'in' , null (Firefox)
in .
var foo = { baz: "bar" };
"bar" in foo; // false
"PI" in Math; // true
"pi" in Math; // false
Array . the in , .
var trees = ["redwood", "bay", "cedar", "oak", "maple"];
3 in trees; // true
"oak" in trees; // false
This page was last modified on 4 2024 . 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 |