Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: function to get frequencies of a char array Date: Fri, 23 Jan 2015 13:49:23 +0100 Organization: solani.org Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1422017355 20711 eJwFwQkBwDAIA0BLvKGVU8jwL2F36VBMBRKRm3tYbZzo6yMnVGNLpB99PsGdfTVmShYOxfoHIYURUA== (23 Jan 2015 12:49:15 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 23 Jan 2015 12:49:15 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 X-User-ID: eJwNyMkBwCAMA7CVctlpxyG47D8C1VNIOncXwcLBsWlFaH8NW8xo+6/IeGoWyuhKG3tbKWz5BQlmEFg= In-Reply-To: Cancel-Lock: sha1:zJbuwIMayIrGJl4M3u4ReH0V51g= X-NNTP-Posting-Host: eJwNyMERACAIA7CVFEpxHaqy/wh6+SWckzvBIKI/2hno3i2mMII1V11Klgp5u3BznV+FuvYAKX4R6A== Xref: csiph.com comp.lang.javascript:26664 Evertjan. wrote: >> The end of an extra empty statement, maybe. >> >> Blocks do not end with a semicolon - ever. Adding one, possibly with the >> intention of improving readability, actually changes the code >> (marginally) by creating an unnecessary empty statement. > > An unnecessary statement of you. IBTD. > As I said, put a ; at the end of a statement: > > if (condition) {statement;} else {statement;statement;}; You can't put a semicolon at the end of block statement, because that is not valid syntax. Putting a semicolon *after* the end of a block statement creates an empty statement.[1] [1] -- Christoph M. Becker