JavaScript is great, but it does leave rather a lot of freedom to be too clever by half tie yourself in knots. At least once you've learnt that lot you can put your rates up: have you seen what silicon roundabout jobs are offering these days?
I went to a demo this evening, one of which was an OCaml IDE that compiled into JavaScript and ran on each keystroke. Clever but clearly barking. I didn't get a coherent answer to the simple question "WHY?"