Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q531

Feedback on: irt.org FAQ Knowledge Base Q531

Sent by John on February 13, 2002 at 08:27:54: - feedback #3588

Worth:
Worth reading

Technical:
Just right

Comments:
Anonymous didn't test his/her code before submitting it...

The line:
var restOfWord = a[i].substring(1, a.length).toLowerCase();

SHOULD read:
var restOfWord = a[i].substring(1, a[1].length).toLowerCase();

otherwise it munches the string.


Sent by anonymous on July 25, 2002 at 02:46:05: - feedback #4027

Worth:
Very worth reading

Comments:
There is a bug in the second code code

on the line:

var restOfWord = a[i].substring(1, a.length).toLowerCase();

it should read:

var restOfWord = a[i].substring(1, a[i].length).toLowerCase();

Otherwise it takes the length of the array and not the element of the array.


Sent by Richard D Shank on August 19, 2002 at 09:00:17: - feedback #4081

Worth:
Very worth reading

Comments:
There is a bug in the second script the line:
var restOfWord = a[i].substring(1, a.length).toLowerCase();

should be

var restOfWord = a[i].substring(1, a[i].length).toLowerCase();

However, I love the site it's a great tool to use to keep me from having to actually sit down and learn JavaScript! I just learn it as I need it. (I haven't used any other the other languages much yet, but I'm sure I will)


Sent by Robyn on October 30, 2002 at 09:15:36: - feedback #4243

Worth:
Worth reading

Length:
Just right

Technical:
Just right

Comments:
Thank you for the useful code. The second method worked great when "substr" was used instead of "substring" for the statement

var restOfWord =
a[i].substr(1).toLowerCase();




Sent by Thomas on Thursday September 20, 2007 at 09:14:12 - feedback #5043

Worth:

Length:

Technical:

Comments:
The posted by Anonymos Code works fine also with German Umlauts if one bug is fixed:

a.length ->(to) a[i].length




©2018 Martin Webb