संभव डुप्लिकेट:
What is the !! operator in JavaScript?
What does !! (double exclamation point) mean?डबल विस्मयादिबोधक क्या करता है !! ऑपरेटर का मतलब है?
मैं कुछ कस्टम के माध्यम से जा रहा हूँ मेरे कार्यस्थल पर जावा स्क्रिप्ट कोड और मैं निम्नलिखित निर्माण को समझने में सक्षम नहीं हूँ।
var myThemeKey = (!!$('row') && $('row').hasClassName('green-theme')) ? 'green' : 'white';
मैं !!
ऑपरेटर को छोड़कर उपरोक्त रेखा पर सबकुछ समझता हूं। मुझे लगता है कि यह NOT
ऑपरेटर है और NOT
NOT
का मूल मूल्य है लेकिन NOT
का NOT
क्यों होगा?
क्या कोई मुझे समझने में मदद कर सकता है कि कोड की उपरोक्त पंक्ति पर क्या हो रहा है?
http://stackoverflow.com/questions/784929/what-is-the-operator-in-javascript –
http://stackoverflow.com/questions/784929/what-is-the-operator-in की दोहराएँ -जवास्क्रिप्ट –
http://stackoverflow.com/questions/784929/what-is-the-operator-in-javascript – Josh