JavaScript Function Editor
built with lite-code-editor
and then use the web developer console for output!
Find more about lite-code-editor
in this demo,
on github,
or on npmjs.
Also take a look at js-func-editor and
the JSY transpiling jsy-func-editor.