Feedback on: irt.org FAQ Knowledge Base Q531
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.
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.
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)
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();
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