> Le 29 juil. 2015 à 13:23, Behrang Saeedzadeh <[email protected]> a écrit :
> 
> For example:
> 
>     obj.property ||= "value";
> 
> This would only assign "value" to obj.property if property is undefined or 
> null.

For me, that syntax suggests strongly: Assign `value` to `obj.property` if  
`obj.property` is falsy. I'd rather want to write:

    obj.property ??= value

where `??` could also be used as binary operator with the semantics you've 
guessed. 

—Claude


> -- 
> Best regards,
> Behrang Saeedzadeh
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to