The first Javascript kata fails with an unknown error, even if the code is correct.<p>You probably want to fix this bit too: <a href="http://imgur.com/KqYuCHn" rel="nofollow">http://imgur.com/KqYuCHn</a><p>Also, if your browser window is too narrow it suddenly thinks you're on a mobile device and ceases to work.
Yea.. Can't get this to work..<p>Q: Given 2 strings, a and b, return a string of the form short+long+short, with the shorter string on the outside and the longer string on the inside. The strings will not be the same length, but they may be empty (length0).<p>My Answer:<p><pre><code> function solution(a, b){
if(typeof(undefined) == typeof(a))
a = "";
if(typeof(undefined) == typeof(b))
b = "";
if(a.length > b.length)
return b + a + b;
else
return a + b + a;
}
</code></pre>
Result:
"Unknown Error"<p>Of course my solution doesn't account for a.length == b.length, but the question is somewhat nonsensical in that it states '...strings will not be the same length, but they may be empty...' (2 empty strings would be the same length)...
Aside from the code tester not working properly, their branding and design are ignorant and overzealous.<p>"Katas"? an Ensō? It's code, chill out.
Little flakey (running on Chrome Mac). I type in an answer, press Submit, and nothing happens. When I reload it finally updates and shows the next question.
Ooops – @setAnnotations:<p>Chrome: "TypeError: Cannot call method 'replace' of undefined"<p>Safari: "TypeError: 'undefined is not an object (evaluating 'f.text.replace')"<p>Firefox: "TypeError: f.text is undefined"<p>Not exactly advertising competence in JS ... (Wasn't there any testing?)
Nice, haven't touched ruby in awhile but glad it's not just me. I was worried when I couldn't troubleshoot a simple multiply function:<p>def multiply(a b)<p><pre><code> a*b
</code></pre>
end
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...<p>I'm glad it's their fault, i was actually getting depressed not finding my error...
Apparently there wasn't a lot of collaboration on the site code itself; as has been mentioned, it's pretty buggy. Or maybe that's the REAL test...
Thanks for all the feedback - we got caught in the middle of a performance upgrade so the sites code challenge engine isn't working under load right now.
I dig it! Didn't get any of the errors everyone else here seems to be experiencing (Chrome on Win, v27). Looking forward to more of this. Nice job.