In the context of IoT applications, the typical application is either a dashboard web page or a HTTP web service - hosted on the device in both cases - serving sensor information to whoever requests it.
Both cases are easily implemented using Javascript on Firefox OS [1].
In contrast, a C(++) application would let you read the GPIO states. But all the HTTP stuff still needs to be implemented. What's a good way to do that? I know C(++), Python and Java. I might select one of these. Can I use Node.js and interface with the C(C++) code? I don't really know.
I think such questions inhibit devs who have not done any/much backend programming from getting into the IoT field at all. Firefox OS solves that problem by exposing low level system interfaces via client-side JS.
As for the larger topic of javascript vs C(++) ecosystem, I can't say much because I'm not that familiar with server side javascript.
[1]: https://hacks.mozilla.org/2015/02/embedding-an-http-web-serv...