DomTerm (https://domterm.org) isn't quite what you asked for: It only indirectly has a JavaScript console: Since its frontend is a browser engine, you can open up a JavaScript debugger.
However, DomTerm can display "rich text" - html, images, mathml and more.
Also, there are (tentative) plans to allow loading JavaScript scripts for interesting extensions.