“NULL VS UNFINADO” Código de respuesta

JavaScript Verifique las variables nulas

var myVar=null;

if(myVar === null){
    //I am null;
}

if (typeof myVar === 'undefined'){
    //myVar is undefined
}
Grepper

NULL UNFINADO

  console.log(null === null);  // true
  console.log(undefined === undefined);  // true
  console.log(null + undefined === null + undefined); // false

// null + undfined equals NaN, and NaN isn't equal to itself :(
Mysterious Monkey

NULL VS UNFINADO

//loosely equal (compare values between two variables)
null == undefined // true  ( null => 0 , undefined => NAN)

//strictly not equal (compare both type and value) 
null === undefined // false  (typeof null => object , typeof undefined => undefined)
null !== undefined // true   (typeof null => object , typeof undefined => undefined) 
Jaimin Patel

Respuestas similares a “NULL VS UNFINADO”

Preguntas similares a “NULL VS UNFINADO”

Más respuestas relacionadas con “NULL VS UNFINADO” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código