toy exercises in javascript tested in node.js