# Equal Operator : Relational Operators « Operators « JavaScript Tutorial

If the values are equal, true is returned from the equal operator (==).

If the values are not equal, false is returned from the operation.

JavaScript attempts to convert the operands to the same data type before comparing the values for all versions of JavaScript except 1.2. JavaScript adheres to the following rules when performing type-conversion:

True is converted to the number 1, and false is converted to zero before being compared.

If either of the operands is NaN, the equality operator returns false.

Null and undefined are equal.

Null and undefined are not equal to 0 (zero), "" , or false.

If a string and a number are compared, attempt to convert the string to a number and then check for equality.

If an object and a string are compared, attempt to convert the object to a string and then check for equality.

If an object and a number are compared, attempt to convert the object to a number and then check for equality.

If both operands of an equality operation are objects, the address of the two objects are check for equality.

By setting the LANGUAGE attribute of the

 2.9.Relational Operators 2.9.1. Equal and Not Equal 2.9.2. Equal Operator 2.9.3. A Comparison Operator returns boolean variable 2.9.4. != (Not Equal) 2.9.5. Identically Equal and Not Identically Equal 2.9.6. not identically equal operator 2.9.7. !== (Non-Identity) 2.9.8. < (Less Than) 2.9.9. ===(Identity) 2.9.10. > (Greater Than) 2.9.11. >= (Greater Than or Equal)
{"ft_lang_label":"__label__en","ft_lang_prob":0.85056585,"math_prob":0.9978184,"size":1084,"snap":"2023-40-2023-50","text_gpt3_token_len":222,"char_repetition_ratio":0.15185185,"word_repetition_ratio":0.20320855,"special_character_ratio":0.20848708,"punctuation_ratio":0.10798122,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9919251,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-07T16:28:48Z\",\"WARC-Record-ID\":\"<urn:uuid:505a2e06-0e94-48b0-a63c-88de626cea10>\",\"Content-Length\":\"12290\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d43b7ed2-cead-4401-b2bc-40e33dba65ef>\",\"WARC-Concurrent-To\":\"<urn:uuid:66ef27e7-d1b9-4eca-84ea-dae5b0bb5d8f>\",\"WARC-IP-Address\":\"52.216.136.18\",\"WARC-Target-URI\":\"http://www.java2s.com/Tutorial/JavaScript/0040__Operators/EqualOperator.htm\",\"WARC-Payload-Digest\":\"sha1:X5NQJODTOUKY5DWN3UOMP4P6MJESUVLC\",\"WARC-Block-Digest\":\"sha1:SOSADGFV2QQHJKPA5QWI5CDMHVLX4WFJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100677.45_warc_CC-MAIN-20231207153748-20231207183748-00629.warc.gz\"}"}