[whatwg] Reverse ordered lists

David Walbert dwalbert at learnnc.org
Wed Jan 23 08:54:28 PST 2008


On Jan 23, 2008, at 11:39 AM, Siemova wrote:

> Very easily:
>
> if start is not specified
> if not reverse
> start = 1
> else
> start = number of items * step
>

It's not that simple -- the last line should be

start = 1 + ( (number of items - 1) * step)

if it's assumed that the last item of the list is numbered one by  
default.


_____
David Walbert
LEARN NC, UNC-Chapel Hill
dwalbert at learnnc.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080123/9f7f49fc/attachment-0001.htm>


More information about the whatwg mailing list