| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Operators/null | [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 ..
null - . JavaScript, null , , (falsy).
function getVowels(str) {
const m = str.match(/[aeiou]/gi);
if (m === null) {
return 0;
}
return m.length;
}
console.log(getVowels("sky"));
// Expected output: 0
null
null null. , ( undefined). API, null , .
// foo - :
> foo
'ReferenceError: foo is not defined'
// foo , , :
> var foo = null; foo
'null'
null undefinednull , undefined . :
var element;
// element : undefined
element = document.getElementById("not-exists");
// , getElementById null
// element null,
null undefined, (==) (===): , .
typeof null; // object ( "null" )
typeof undefined; // undefined
null === undefined; // false
null == undefined; // true
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-null-value |
This page was last modified on 29 . 2026 . 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 |