Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #40987
| Path | csiph.com!aioe.org!PciQ4lDHv7AA88MNUkMuTg.user.46.165.242.91.POSTED!not-for-mail |
|---|---|
| From | emf <emfril@gmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | JSLint: "Wrap a ternary expression in parens, ..." |
| Date | Thu, 14 Jul 2022 16:44:18 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <tapv73$1pkf$1@gioia.aioe.org> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | gioia.aioe.org; logging-data="59023"; posting-host="PciQ4lDHv7AA88MNUkMuTg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
| Content-Language | en-US |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| Xref | csiph.com comp.lang.javascript:40987 |
Show key headers only | View raw
Hi.
JSLint now does not like this code (that it used to find OK), saying
"Wrap a ternary expression in parens, with a line break after
the left paren."
=================
orb = (orb0Btn.checked)
? 0
: (orb5Btn.checked)
? 5
: (orb10Btn.checked)
? 10
: (orb15Btn.checked)
? 15
: 20;
=================
What is now the correct syntax for the ternary expression?
Thanks,
Eustace
--
Natal Transits Calculator
https://emf.neocities.org/nt/nataltransits2.html
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
JSLint: "Wrap a ternary expression in parens, ..." emf <emfril@gmail.com> - 2022-07-14 16:44 -0400
Re: JSLint: "Wrap a ternary expression in parens, ..." "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2022-07-15 08:40 -0700
Re: JSLint: "Wrap a ternary expression in parens, ..." emf <emfril@gmail.com> - 2022-07-15 14:24 -0400
Re: JSLint: "Wrap a ternary expression in parens, ..." "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2022-07-16 08:37 -0700
Re: JSLint: "Wrap a ternary expression in parens, ..." emf <emfril@gmail.com> - 2022-07-16 17:46 -0400
Re: JSLint: "Wrap a ternary expression in parens, ..." emf <emfril@gmail.com> - 2022-07-16 17:27 -0400
Re: JSLint: "Wrap a ternary expression in parens, ..." emf <emfril@gmail.com> - 2022-07-15 14:19 -0400
csiph-web