Article View: pl.comp.lang.javascript
Article #8743Re: szkolka
From: "Krzyszt_off"
Date: Fri, 17 Jan 2003 13:32
Date: Fri, 17 Jan 2003 13:32
12 lines
293 bytes
293 bytes
> > function Digit(a){return > a=='I'?1:a=='V'?5:a=='X'?10:a=='L'?50:a=='C'?100:a=='D'?500:a=='M'?1000:0} function Digit(a){return[1,5,10,50,100,500,1000]['IVXLCDM'.indexOf(a)]} Wprawdzie nie algorytmicznie (no bo nie bede kopiowal Twojego kodu), ale troche sie poprawilem :) Krzysiek
Message-ID:
<b08ss7$np3$1@news.tpi.pl>
Path:
polish.pugleaf.net!archive.newsdeef.eu!mbox2nntp-pl.comp.lang.javascript.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news-stoc.telia.net!news-stoa.telia.net!telia.net!newsfeed.tpinternet.pl!news.tpi.pl!not-for-mail
References:
<b06bao$cp7$1@news.tpi.pl> <b06hbj$jbk$1@news.tpi.pl> <b0700o$83b$1@news.tpi.pl>