AND and OR in if statement

Rick Waldron waldron.rick at gmail.com
Wed May 25 23:20:54 UTC 2016


This is a non-starter, as AND and OR are already valid identifiers.

On Tue, May 24, 2016 at 9:15 PM Francis Clavette <clavette.francis at gmail.com>
wrote:

> Hi,
> I’d like to be able to use AND for && and OR for || in conditional
> statements in a future version of ECMAScript. It’s a feature I’ve always
> been wanting since transitioning from PHP. It’s also much cleaner :
>
> if ($scope.newSourceModal.isShown() && $scope.newsource.type == "book" &&
> (!$scope.insertingFromScan || $scope.ok))
>
> ==============
>
> if ($scope.newSourceModal.isShown() AND $scope.newsource.type == "book"
> AND (!$scope.insertingFromScan OR $scope.ok))
>
>
> Francis
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160525/5d2df51b/attachment.html>


More information about the es-discuss mailing list