Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: Comparisson with a list arguments. Date: Tue, 12 Nov 2019 12:13:14 +0100 Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net pRAcgbbFk9rCl3DEOdAGlAI63lRPnzHUK+WW091JGJ9CVtw6p0 Cancel-Lock: sha1:G6Hb8Uta3QOKWqDNVwsd1Wa2+aI= In-Reply-To: Content-Language: en-US Xref: csiph.com comp.lang.javascript:37756 On 08.11.19 09:07, Jonas Thörnvall wrote: > It would be handy to be able to have a list of arguments to compare > with, of course one could store the values in an array use a loop to > scroll thru. > > But something like this would be easier to use. > > if (track[editTrack].midiMess[i].data0 == ("224" || "112" || "128")) > > > One can wonder why the most obvious solustions never implemented? I > think it is weird, i just don't get it.... It is: > And then you end up with a string that is hardly readable, or the > need to read in the values into an array. It is just weird, do you > guys never favour readability of code? Who is "you guys"? You have to ask the people maintaining ECMAScript. -- Arno Welzel https://arnowelzel.de