Adding Javascript version of Bob problem