lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Sunday, May 18, 2014, Jay Carlson <nop@nop.com> wrote:

On May 18, 2014 12:05 PM, "Andrew Starks" <andrew.starks@trms.com> wrote:

> However, if anything were to be done, it must make things clearer. So, which is clearer to you:
>
> ```
> --Do we have have an item, with a background color?
> if not (document.body.item
>     and document.body.item.style
>     and document.body.item.style.backgroundColor) then
>     ....
> end
>
>
> --or (accepting alternate forms of the OP's style (|?.| or what have you)
>
> if not document.body?item?style?backgroundColor then
>    ...
>
> end

What's inside the body of the "if"?


Don't set the background color? The example is completely contrived. If the use cases aren't obvious, then it's fair to ask for real examples. But, I'm not sure I follow the question.