ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Code Koans

<< < (3/3)

ewemoa:
Have had success running the JavaScript set by David Laing on an Android tablet.  The editing is a bit painful at times (using the built-in editor that comes with ES File Explorer), but at least it is doable.  I've tried with Opera Mobile so far.

ewemoa:
On a pc, using an interactive shell / repl seems to be helpful for trying things out -- for JavaScript, I'm using the 'node' command from node.js with no arguments and this seems usable.

Haven't tried out anything similar for Android yet -- may be SL4A is worth considering...

ewemoa:
Made it through David Laing's set -- punted the extra credit section for the moment.  A side effect of doing this set was that got some experience with Underscore.js and Jasmine.

Also, the coding style of the tests seems closer to that of Crockford / jslint than what I'm seeing in so far in Liam McLennan's set.

ewemoa:
Liam McLennan's set appears to cover more basic ground and doesn't appear to be influenced much by jslint-ish concerns (e.g. placement of 'var', use of ++, etc.).  On a minor note, I noticed some typos and spacing felt odd at times.

It uses QUnit, so one can get some experience with that.

Also got quite stuck on the first part of the 'hasOwnProperty' test -- and looks like someone else did too:

  http://stackoverflow.com/questions/6807005/javascript-koans-cannot-solve-one-test

As of this writing, the answer at StackOverflow doesn't work here, FWIW.

For this particular item, node.js' repl was not helpful -- it doesn't provide a browser context.  A repl in a browser may not have helped either, as arrays had been modified by the test set specifically for testing...

details...SO has 'fruits.prototype' for the third element of keys -- here what worked was 'equalTo'

Navigation

[0] Message Index

[*] Previous page

Go to full version