JavaScript variables are not being registered outside of cells
See original GitHub issueDescribe the bug
Apologies if this is a misunderstanding of kernel limitations.
I can import a C# variable into JavaScript without issues. However, if I declare a JS variable in a JS cell using either let
or const
, that variable does not seem to be registered in the variables section, is not available in the next cell (even if it’s a JS cell), does not share correctly to C# or other kernels, and perhaps most interestingly, doesn’t log out at the end of the same cell it was defined in if it was the closing value as in:
let jsVar = 42;
jsVar; // jsVar is not displayed after the cell
JavaScript otherwise appears to function just fine, but variable persistence and sharing just isn’t working for me.
See https://github.com/IntegerMan/PolyglotNotebookTalk/blob/main/cs_js.dib for my sample notebook.
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the #!about
magic command. ):
- OS
- Windows 11
- Windows 10
- macOS
- Linux (Please specify distro)
- iOS
- Android
- Browser
- Chrome
- Edge
- Firefox
- Safari
- Frontend
- Jupyter Notebook
- Jupyter Lab
- nteract
- Visual Studio Code
- Visual Studio Code Insiders
- Visual Studio
- Other (please specify)
Screenshots
Issue Analytics
- State:
- Created 5 months ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
I’d also put it in the FAQ as I checked that for this along with the kernels overview before opening the issue.
Thank you so much for the reply @jonsequitur. I’ll play around with that tonight!