How useful is a JavaScript miner?
Javascript has access to OpenGL ES, including shaders, so it has access to programmable parts of the GPU at nearly native speeds. I think that a smart kid might be able to build a fragment shader that does SHA256 hashing, which outputs to the stencil buffer, so that Javascript has a 2-way communication channel with the GPU.

So yeah, you could probably use javascript to mine at really nice speeds. Maybe 70% or 80% of what an OpenCL GPU miner does?

[Edit] oh look, someone already built a fragment shader that does that
[Edit 2] and an actual JS/WebGL application