Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Mr. Man-wai Chang" Newsgroups: comp.lang.javascript Subject: Re: Bubblesort Date: Fri, 4 Mar 2016 21:59:07 +0800 Organization: Hung Hom, Kowloon, Hong Kong Lines: 22 Message-ID: References: <0d68ee6d-8a80-439e-ae04-17743584e2e4@googlegroups.com> <086a7397-459b-46e3-b83c-cfc7edf4188a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 4 Mar 2016 13:56:04 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d8506d156af3d0cd28ee33da089db589"; logging-data="22597"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zyHO5VK/SeOICi2WX3TcM" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <086a7397-459b-46e3-b83c-cfc7edf4188a@googlegroups.com> Cancel-Lock: sha1:Kt0/1m8lBXeahXHEJu6YSZoG5v8= Xref: csiph.com comp.lang.javascript:29804 On 3/4/2016 9:15 PM, jonas.thornvall@gmail.com wrote: > > I thought this would sort the property "subarray" nodelinks. > arr[0].nodelinks.sort(); > But after sort it write out same content as before sort. > 1,10,11,12,13,14,15,16,17,2,3,4,5,6,7,8,9 > My object something like this. > arr[k] ={nodelinks : []}; I don't know what you are trying to write or build. I seldom heard people doing elaborate mathematics with Javascript, which is used mainly for displaying web-pages. Are you abusing if not misusing a tool here? -- @~@ Remain silent. Nothing from soldiers and magicians is real! / v \ Simplicity is Beauty! May the Force and farces be with you! /( _ )\ (Fedora release 23) Linux 4.4.3-300.fc23.x86_64 ^ ^ 21:42:01 up 19:51 0 users load average: 1.05 1.03 1.05 不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA): http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa