अशक्त जाँच के लिए, आप उपयोग कर सकते हैं ! हालत।
उदाहरण
निम्नलिखित कोड है -
var value=null;
if(!value) {
console.log("This is null.");
} else {
console.log("This is not null.");
} उपरोक्त प्रोग्राम को चलाने के लिए, आपको निम्न कमांड का उपयोग करने की आवश्यकता है -
node fileName.js.
यहाँ, मेरी फ़ाइल का नाम है demo305.js.
आउटपुट
यह निम्नलिखित आउटपुट देगा -
PS C:\Users\Amit\javascript-code> node demo305.js This is null.