I'm puzzled about what's wrong with the good old `[a, b].some(x => x ===
object.property.secondProp)`. If you insist on sugarizing this (but why?),
then it could be `[a, b].some(=== object.property.secondProp)`, or even
`[a, b].||(=== object.property.secondProp)`. But again, why?

If you really want to write `<|(||`, I suggest you switch to APL.

--
Bob

On Fri, Feb 3, 2017 at 12:02 PM, Sendil Kumar N <
[email protected]> wrote:

> This is a far more useful option and more sugary syntax. We can use `<| ` as 
> an identifier.
>
> ```
>
> // <| ( operator, arguments )
>
> if (object.property.secondProp ===  <|(||, 'a' , 'b')) {
>     // do Something
> }
>
> if (object.property.secondProp ===  <|(&&, 'a' , 'b')) {
>
>     // do Something
> }
>
> ```
>
> In case of testing nested
>
> ```
>
> if (object.property.secondProp ===  <|((||, 'a' ,(&&, 'c' , 'b'))) {
>     // do Something
> }
>
> ```
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to