MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/5v494h/learn_javascript_with_interactive_challenges_earn/de45536/?context=3
r/javascript • u/memystic • Feb 20 '17
17 comments sorted by
View all comments
0
This website has bugs and thus not reliable.
Example:
Challange
Replace Letters With Position In Alphabet
Solution
function alphabetIndex(str) { return str.toLowerCase().split('').map((x) => { if (/[a-z]/.test(x)) { return x.charCodeAt(0) - 96; } }).join(' ').trim(); }
Tests (Failed)
Expected: '3 8 5 3 11 2 1 3 11 20 15 13 15 18 18 15 23 9 23 9 12 12 19 5 5 9 6 20 8 5 2 15 15 11 8 1 19 1 18 18 9 22 5 4', instead got: '3 8 5 3 11 2 1 3 11 20 15 13 15 18 18 15 23 9 23 9 12 12 19 5 5 9 6 20 8 5 2 15 15 11 8 1 19 1 18 18 9 22 5 4'
Proof (Gives true)
"3 8 5 3 11 2 1 3 11 20 15 13 15 18 18 15 23 9 23 9 12 12 19 5 5 9 6 20 8 5 2 15 15 11 8 1 19 1 18 18 9 22 5 4" === "3 8 5 3 11 2 1 3 11 20 15 13 15 18 18 15 23 9 23 9 12 12 19 5 5 9 6 20 8 5 2 15 15 11 8 1 19 1 18 18 9 22 5 4" // true
0
u/[deleted] Feb 23 '17
This website has bugs and thus not reliable.
Example:
Challange
Replace Letters With Position In Alphabet
Solution
Tests (Failed)
Proof (Gives true)