Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Handling multiple results from combinations Date: Tue, 24 Jan 2017 05:34:59 +0100 Organization: PointedEars Software (PES) Lines: 25 Message-ID: <3395715.fW5hKsROvD@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1485232517 13021 eJwFwYkBwCAIA8CVhPDIONYm+4/gXaKsbkdlRSoF53cbJf2xGSJXIP2Erc0lzQEHdJqLPf0AKXgRbw== (24 Jan 2017 04:35:17 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 24 Jan 2017 04:35:17 +0000 (UTC) User-Agent: KNode/4.14.2 X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. Say there are 10 options that can be selected in any order and each > combination produces a different result. Is there some way to approach > judging the options to choose the result without having such a tree full > of IF statements: > > if (a && b && c...) { > // > } else if (a && b && !c...) { > // > } else if (a && !b && !c...) { > // > } else if (!a && b && !c...) { > // > } else if (!a && !b && !c...) { > ... Yes. -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.