Is it possible to compile Javascript in a cell in Jupyter ?
Christopher
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/8caf2bbd-db67-9bfb-7852-ec4961d40fdc%40gmail.com.
I hope one can switch between the native python kernel and javascript, that is something I'll have to find out; I guess there is a kernel for C as well ?
Christopher
On 9/25/2019 11:21 AM, Jason Grout wrote:
Javascript doesn't have a print() function. You can't mix javascript and python syntax or variables.
To show something from Javascript you can do a console.log() to log to the browser console.
You could also just install a javascript kernel if you really just want to work in javascript always. I haven't tried it, but for example IJavascript is listed in our kernels page at https://github.com/jupyter/jupyter/wiki/Jupyter-kernels.
Jason
On Wed, Sep 25, 2019 at 8:09 AM CrestChristopher <crestchr...@gmail.com> wrote:
For example;
var one = "apple";
print(one);I don't want a Jupyter cell to print the code as it was typed; I want it to show the result of the variable
onewhich in this case would be
apple` ?Sorry my client screwed up the styling of the comment.
On 9/25/2019 11:06 AM, Jason Grout wrote:
Can you post a code snippet of what you have tried, and what is not working about it?
I'm not sure what you are trying to do with `import javascript`.
Jason
On Wed, Sep 25, 2019 at 8:02 AM CrestChristopher <crestchr...@gmail.com> wrote:
I have some Javascript which I want to run as executed. I know about
%%js
or%%javascript
but I must also do
import javascript
in the cell, which is the correct syntax ?Christopher
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAPDWZHzJQ89G_bKMqkpK_bF1%3DT7yNemotB%3DF%2BHuRzMvKMk%2Bw_g%40mail.gmail.com.