[LRUG] Array.slice question
Neil Middleton
neil.middleton at gmail.com
Wed Sep 7 01:40:02 PDT 2011
Ah yes, see what you mean. Good question ;)
Neil
On Wednesday, 7 September 2011 at 09:34, Michael Pavling wrote:
> On 7 September 2011 09:33, Neil Middleton <neil.middleton at gmail.com (mailto:neil.middleton at gmail.com)> wrote:
> > You're asking for no length with [3,0] hence it slicing at position 3 for 0
> > chars. With the second version you're using an out of range start position
> > hence the nil.
>
> But if x[3] is nil (because it's out of range), how come starting the
> slice at 3 doesn't count as out of range too?:-/
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org (mailto:Chat at lists.lrug.org)
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20110907/47bc435e/attachment-0003.html>
More information about the Chat
mailing list