Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: string comparison fails? - Image1.jpg (0/1) Date: Sat, 17 Oct 2015 14:37:57 +0100 Organization: A noiseless patient Spider Lines: 28 Message-ID: <877fmlpqdm.fsf@bsb.me.uk> References: <08642bl9537lanf90ghcng1hefvuejcl20@4ax.com> <87io65pzlw.fsf@bsb.me.uk> <4114734.0R2ZEXP6cX@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="626"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189aeRFeNFcVZd3LrgdY2PaeBg+F+cj+54=" Cancel-Lock: sha1:8SC0r9OT+8oy88q2T8uXY/XayU8= sha1:64OFlOOblY1OaDdCQnbOU5HImeI= X-BSB-Auth: 1.84935197af3eee0262eb.20151017143757BST.877fmlpqdm.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:28834 Thomas 'PointedEars' Lahn writes: > Ben Bacarisse wrote: >> joe writes: >>> var ii=apu2.length; >>> for (i=0;i>> { >>> allte=apu2[i].substring(0,4); >>> if (allte=="TTY") >> >> There's a big clue here. How can a 4 character string ever equal "TTY"? > > When it is only three characters long: "TTY".substring(0, 4) == "TTY". Thou wouldst make a good fool[1]. > That was easy. What was? It's certainly not an answer to my (rhetorical) question. [1] FOOL The reason why the seven stars are no more than seven is a pretty reason. LEAR Because they are not eight? FOOL Yes indeed. Thou wouldst make a good fool. -- Ben.