Link Details

Link 1018451 thumbnail
User 225256 avatar

By mswatcher
via 2ality.com
Published: Aug 23 2013 / 03:33

The conversion to boolean is different for historic reasons: For ECMAScript 1, it was decided to not allow objects to configure that conversion. The rationale was as follows. The boolean operators || and && preserve the values of their operands. Therefore, one may have to coerce the same object several times. That was considered a performance problem and led to the rejection.
  • 9
  • 0
  • 214
  • 571

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (0)



    Spring Integration
    Written by: Soby Chacko
    Featured Refcardz: Top Refcardz:
    1. Search Patterns
    2. Python
    3. C++
    4. Design Patterns
    5. OO JS
    1. PhoneGap
    2. Spring Integration
    3. Regex
    4. Git
    5. Java