Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #40987
| From | emf <emfril@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | JSLint: "Wrap a ternary expression in parens, ..." |
| Date | 2022-07-14 16:44 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <tapv73$1pkf$1@gioia.aioe.org> (permalink) |
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