solved 1-8 in javascript
added ruby solution for 1.1.8