By now (this is an old thread) Pas2JS has matured a lot and can be integrated in the Lazarus IDE with code completion, debugging and all. It is now very powerful and can target both server-side (e.g. node.js) and client-side JavaScript.
I strongly suggest to play with it and have a look at the examples and tests. I like SMS, but I like the current, matured, Pas2JS too (it may be even better for server-side JavaScript)
I find it *very* easy to use, though documentation is still sparse. And I had the benefit of watching a comprehensive live demo and presentation by dev(s) that made things a lot easier to me.
Note: Best results are with trunk... 1.9/3.1.1