[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/null [Back]  [Original]

null - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

null

Baseline

20157

null JavaScript 1

function getVowels(str) {
  const m = str.match(/[aeiou]/gi);
  if (m === null) {
    return 0;
  }
  return m.length;
}

console.log(getVowels("sky"));
// : 0

js
null

null null null undefined null API null

js
// foo :
foo; // ReferenceError: foo is not defined
js
// foo :
const foo = null;
foo; // null

null undefined

null undefined (==) (===)

js
typeof null; // "object" ( "null" )
typeof undefined; // "undefined"
null === undefined; // false
null == undefined; // true
null === null; // true
null == null; // true
!null; // true
Number.isNaN(1 + null); // false
Number.isNaN(1 + undefined); // true

ECMAScript 2027 LanguageSpecification
# sec-null-value


Web Proxy Viewer  |  New URL  |  Original Page